I use Firebase to store images in my android application. Images are uploaded to the repository once and never change again. To download and display them from the database using Glide v4. In order to save traffic, I would like to download them from the database only if there is no locally saved copy on the device.
My whole problem is that Glide caches images for a fairly short time. I read in Google that the lifetime of the cache is determined based on the headers of the server response when the file is downloaded, something like that ....
Is it possible to somehow forcefully increase the cache lifetime in Glide, which would be the easiest solution, or do you have to write an additional layer that will check for the presence of a picture on the device and, if necessary, load it from the database.