Skip to content
Snippets Groups Projects
Commit 6a983d5b authored by Alex Reisner's avatar Alex Reisner
Browse files

Merge pull request #643 from swoker/readme-cache-update

Readme update for Geocoder.cache usage
parents 1098046f a8e6a1b1
No related branches found
No related tags found
No related merge requests found
......@@ -660,8 +660,12 @@ By default the prefix is `geocoder:`
If you need to expire cached content:
Geocoder.cache.expire("http://...") # expire cached result for a URL
Geocoder.cache.expire(:all) # expire all cached results
Geocoder::Lookup.get(Geocoder.config[:lookup]).cache.expire(:all) # expire cached results for current Lookup
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).
......
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