简体   繁体   English

Rails Geokit缓存

[英]Rails geokit caching

How would you cache GeoKit requests? 您将如何缓存GeoKit请求?

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 网址: 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. 确保/ tmp在服务器进程中可写。

Note: /tmp must be writable in order to use the query caching functionality. 注意:/ tmp必须是可写的,才能使用查询缓存功能。

via Seebq's geokit gem . 通过Seebq的geokit gem Make sure you are using Seebq's gem, because it is a fork of Andre's geokit gem to add cache support. 确保您使用的是Seebq的gem,因为它是Andre的geokit gem的一个分支,用于添加缓存支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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