0

I have successfully implemented a recycler view with images to event show the data when user start application without internet connection. I've achieved this by using. But the problem this disk cache won't stay much longer. If I restart app after like 30 min those images were failed to load from disk cache.

Is there any way to keep these disk cache much longer time. Like in Facebook, Instagram apps. these images are around 15kb and have like 30 images.

Another little question, Is there any way to know whether file in the disk cache before it load in to image view. before do below code.

Picasso.with(context)
       .load(eventTable.getActorTable().getImagePath())
       .into(holder.avatarImageView, new Callback() {
             @Override
             public void onSuccess() {

             }

             @Override
             public void onError() {
                Picasso.with(context).load(R.drawable.default_image).into(holder.avatarImageView);
             }
   });

0 Answers0