开发者

Rails geokit caching

开发者 https://www.devze.com 2022-12-18 22:49 出处:网络
How would you cache Geo开发者_如何学CKit requests? This does not work for me... Geokit::Geocoders::query_cache= true

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消