Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove cached images (by API/manual) #14
Remove cached images (by API/manual) 
Submitted by Eugene Huseynov on 23-8-2016 0:00:00
Image source (url parametre) is: https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=2048x350&scale=2&maptype=roadmap&zoom=13&markers=color:blue|size:small|1400+Oakton+Street,+Evanston,+IL+60202
I'm using following images.weserv.nl parameters:
Some of the "google map images" cached properly, some of them is not (link provided above - final link)
Is any api/way to expire/delete/rebuild/invalidate existing image cache?
by Andries Louw Wolthuizen on 23-8-2016 0:00:00
Need to check if there is a reliable way to remove images from all caches. Will look into this!
Comment by Eugene Huseynov on 30-8-2016 22:39:00
I appreciate for your time and energy you spend for this project.
Any luck to fix such king issues or may be add an API for the project so customers could reset/update/delete cached images themself?
Thank you one more time.
Comment by Andries Louw Wolthuizen (Webmaster, Images.weserv.nl - Image cache & resize proxy) on 1-9-2016 18:53:00
This project didn't start with the intent of providing access to reset/update/delete images. To serve all users, there are caches at multiple levels involved (edge, processing, backplanes, requesters). The difficulty is that not all of these caches are capable of reliable removing single entries, and the freshness is also varying wildly (based on effort to recreate, the number of requests, etc, etc).
However, the feature as proposed is still on the roadmap, and will probably be implemented in the next code-refresh. When this will be finished is uncertain, as many new features and changes are to be incorporated in such an update.
In the meanwhile, you could consider using our code to set up your own solution. The GitHub-repo is sans any cache, so you should extent it with your own caching solution, or disregard it completly. For starters I would advise some form of reverse caching proxy (like nginx).
There is no update yet, implementation is quite difficult. We have some code laying around to remove images from 1 or 2 cache-levels, but not yet from every cache (we cache on ~4 different levels nowadays), and this code isn't reliable enough for production yet. You could use the source-code to host your own image proxy, caching is something that isn't included in the source (we cache by means of 2x Nginx+Memcached+Squid).
I've tried to clear the cache for this URL, URL encoded and not, but no luck so far. Also tried without ssl: and with https://.
Do you see any other solution or does it simply not work? ;)
Due to #186 it may seem that we cache longer; but there is no change in the amount of time we cache server side. Finishing this feature is still on our roadmap, and work is ongoing, but we need to write additional API's for all the different layers of caching we use.