Skip to content
Snippets Groups Projects
Commit 6a09f08c authored by Simon Woker's avatar Simon Woker
Browse files

Readme update for expire cache

parent 1098046f
No related branches found
No related tags found
No related merge requests found
...@@ -660,8 +660,11 @@ By default the prefix is `geocoder:` ...@@ -660,8 +660,11 @@ By default the prefix is `geocoder:`
If you need to expire cached content: If you need to expire cached content:
Geocoder.cache.expire("http://...") # expire cached result for a URL Geocoder::Lookup.get(Geocoder.config[:lookup]).cache.expire(:all) # expire cached results for current Lookup
Geocoder.cache.expire(:all) # expire all cached results Geocoder::Lookup.get(:google).cache.expire("http://...") # expire cached result for a specific URL
Geocoder::Lookup.get(:google).cache.expire(:all) # expire cached results for Google Lookup
# expire all cached results for all Lookups. Be aware that this methods spawns a new Lookup object for each Service
Geocoder::Lookup.all_services.each{|service| Geocoder::Lookup.get(service).cache.expire(:all)}
Do *not* include the prefix when passing a URL to be expired. Expiring `:all` will only expire keys with the configured prefix (won't kill every entry in your key/value store). Do *not* include the prefix when passing a URL to be expired. Expiring `:all` will only expire keys with the configured prefix (won't kill every entry in your key/value store).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment