简体   繁体   中英

Rails geokit caching

How would you cache GeoKit 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM