chrisben / imgcache.js

JS library based on the File API to cache images for offline recovery (target: cordova/phonegap & chrome)
Other
826 stars 216 forks source link

invalidating an image #134

Closed martinjbaker closed 9 years ago

martinjbaker commented 9 years ago

readme says

There is currently no way to invalidate single images from the cache.

but below that it says

ImgCache.removeFile() -- removes a given file from the cache

needs updating?

chrisben commented 9 years ago

What I meant with this readme comment is to have a solution that would automatically expire/invalidate cached images : either depending on the HTTP response headers (Expires, ETag ..) or just a simple rule that would define for how long images should be kept in the cache.

You can of course implement this logic yourself and use ImgCache.removeFile to remove the file from the cache.