Reputation: 95
When using glide to load images from firebase storage, is there a possibility to check metadata of the file to make sure that the current cached edition is not outdated? In my usecase, i sometimes update files within a static reference. This used to be an easy option for me until caching of glide came into play. It keeps showing the cached version, not knowing that theres new data in storage under that ref.
I know that i can switch off caching. What i would like to achieve is to check metadata first and then load from cache if the data is still current. I have seen the .signature option in glide an was wondering if it is working somehow with firebase but couldnt find anything.
Upvotes: 0
Views: 242
Reputation: 317392
There is no simple configuration for this. You will have to write code that uses the Firebase SDK to get the metadata and check it yourself. Based on the result of that, you will then have to use Glide's API to invalidate the cache as needed. I'm sure it will be a non-trivial amount of code.
Upvotes: 2