React-native-fast-image: [Question] How do i control cache expires?

Created on 21 Jun 2017  路  6Comments  路  Source: DylanVann/react-native-fast-image

This is great module, but i wonder how do i control image cache expires.
In example: I do want to cache a.jpg file for a week.

Thank you so much.

question

Most helpful comment

please create method to clear all cache, thanks

All 6 comments

By default SDWebImage and Glide do aggressive caching. They basically cache an image from a url as long as possible. An image will be cleared from the cache if the program runs out of space for caching images, on a first in first out basis.

There isn't a way to control max age for individual images.

If you want optimal performance you should use immutable resources, new image, new url, cache is busted automatically, no worrying about expiration.

Thank you @DylanVann

@DylanVann Both Glide and SDWebWebImage supports cache controlling, see https://github.com/rs/SDWebImage#handle-image-refresh
https://github.com/bumptech/glide/issues/1768

please create method to clear all cache, thanks

any solution to clear cache of a special url?

@DylanVann Sorry to bring this thread back to life after so long, but I'm wondering if you could tell me what the max cache size is for Android and IOS.

I'm not looking to manipulate that size, I just want to know what the max size is. It is my understanding that Android does not control the max cache size.

Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NgocNamFNT picture NgocNamFNT  路  3Comments

pehagg picture pehagg  路  3Comments

mschipperheyn picture mschipperheyn  路  3Comments

OmarBasem picture OmarBasem  路  3Comments

guihouchang picture guihouchang  路  4Comments