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

Deprecate Geocoder.cache method.

Cache is now lookup-specific.
parent a0448d4c
No related branches found
No related tags found
No related merge requests found
......@@ -43,10 +43,8 @@ module Geocoder
# The working Cache object, or +nil+ if none configured.
#
def cache
if @cache.nil? and store = Configuration.cache
@cache = Cache.new(store, Configuration.cache_prefix)
end
@cache
warn "WARNING: Calling Geocoder.cache is DEPRECATED. The #cache method now belongs to the Geocoder::Lookup object."
Geocoder::Lookup.get(Geocoder.config.lookup).send(:configuration).cache
end
end
......
......@@ -230,7 +230,10 @@ module Geocoder
# The working Cache object.
#
def cache
Geocoder.cache
if @cache.nil? and store = configuration.cache
@cache = Cache.new(store, configuration.cache_prefix)
end
@cache
end
##
......
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