lib/geocoder/cache.rb in geocoder-1.1.6 vs lib/geocoder/cache.rb in geocoder-1.1.7
- old
+ new
@@ -13,10 +13,12 @@
interpret case
when store.respond_to?(:[])
store[key_for(url)]
when store.respond_to?(:get)
store.get key_for(url)
+ when store.respond_to?(:read)
+ store.read key_for(url)
end
end
##
# Write to the Cache.
@@ -25,9 +27,11 @@
case
when store.respond_to?(:[]=)
store[key_for(url)] = value
when store.respond_to?(:set)
store.set key_for(url), value
+ when store.respond_to?(:write)
+ store.write key_for(url), value
end
end
##
# Delete cache entry for given URL,