How would you cache Geo开发者_如何学CKit requests?
This does not work for me...
Geokit::Geocoders::query_cache = true
Geokit::Geocoders::query_cache_max_age = 86400 # 1 day in seconds
URL: http://github.com/seebq/geokit-gem
I'm not sure I understand the question, so I'll just throw an answer out there:
Do you mean something like storing a hash of location/coordinates in memory, or in the database, for instance?
Make sure /tmp is writable from your server process.
Note: /tmp must be writable in order to use the query caching functionality.
via Seebq's geokit gem. Make sure you are using Seebq's gem, because it is a fork of Andre's geokit gem to add cache support.
精彩评论