NativeScript / nativescript-fresco

This repository holds the NativeScript plugin that exposes the functionality of the Fresco image library to NativeScript developers.
Apache License 2.0
53 stars 23 forks source link

Feature Request: Expose Ability to Clear Caches #14

Closed ComputerTinker closed 8 years ago

ComputerTinker commented 8 years ago

The Fresco website talks about the ability to clear the library's cache, either for an individual URL, or just to clear the entire cache for all URLs at once: http://frescolib.org/docs/caching.html

I did a search through the nativescript-fresco code for "cache", however, and I don't see anywhere where that functionality is exposed. Could you please enlighten me if it's possible to do this under the current version? If not, I would like to request this as an enhancement request.

Here's my situation: I have a ListView component which is showing the user several images, but they also have the ability to click a button and take a photo with their camera which is uploaded to the server and then needs to replace one of the shown images. The trick is that the new photo will have the same URL as the old one, since the image name is based off of the ID of the item being shown. (eg. https://myserver.com/stuff/items/24.jpg)

Any help appreciated. Thanks!

VladimirAmiorkov commented 8 years ago

Hi @ComputerTinker ,

Thank you for adding this feature request, cache management in the plugin has been on my mind for some time and I will try it implement it as soon as possible, so stay tuned.

VladimirAmiorkov commented 8 years ago

Implemented in 1.0.7, for more information on how to use this feature please refer the "Cache" section from the readme.

ComputerTinker commented 8 years ago

Thank you for this enhancement.