Images are not caching using Glide

46
May 12, 2019, at 3:00 PM

I am using Glide to load images and OkHttp3 library for networking as I am fetching images form node server.I want to cache images so that they do not load from network when activity opens every time. Whenever activity opens it starts fetching data from network I simply want to cache data and whenever new image upload on server it should load data from network.

I am using this code below to cache image but it seems nothing is happening.

 RequestOptions requestOptions = new RequestOptions();
 requestOptions.placeholder(R.drawable.openbook);
 requestOptions.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
 Glide.with(context).load(model.getImage()).apply(requestOptions).into(slideImage);

Let me know some possible solution of my problem any help would be appreciated.

THANKS

READ ALSO
How to show a generating PDF file name and downloaded filename while Generating PDFs from sql server database with large amount of data in asp.net

How to show a generating PDF file name and downloaded filename while Generating PDFs from sql server database with large amount of data in asp.net

I am generating multiple PDF files, then downloading all of them and saving them to local directory in one clickI have huge amount of data in my SQL server database, usually it is taking lot of time to generating, downloading and saving them to folder...

54
Adding styling to randomly generated Javascript numbers

Adding styling to randomly generated Javascript numbers

I'm trying to add styling (css) and have the ability to place some randomly generated numbers(%) anywhere I want (in a <div> to be more specific), but I don't know to achieve this

54
Maintaing a list through two functions python

Maintaing a list through two functions python

I am trying to create a character selection CLI using python

62