imsamgarg / firebase_cached_image

Cache Manager and Cached ImageProvider for Firebase Cloud Storage Objects.
MIT License
10 stars 17 forks source link

Feature Request: Set Expiration for Cache Objects #8

Open dannyhyatt opened 1 year ago

dannyhyatt commented 1 year ago

Would love a feature that includes a parameter in CacheOptions along the lines of timeToRefresh where I can set how many seconds an image should be in a cache before it's refreshed.

imsamgarg commented 1 year ago

Great idea. I would consider this idea. I'm just thinking of adding a field something like 'expireAfter' or 'maxAge' or like you said 'timeToRefresh'. And let a user pass the 'Duration' object to that. After that time period passed away the cached object will be automatically refreshed.