Rails redis_store 如何在 rails2.3.11 使用?

lucifer · 2012年03月08日 · 最后由 huacnlee 回复于 2012年03月08日 · 3342 次阅读

redis on rails 2.3.11 1.安装 redis,正常运行

  1. 安装 redis 与 redis_store gem 包 3.添加 config.gem "redis-store" config.cache_store = :redis_store 到 environment.rb

重启 web 服务后,在网站上添加添加查找数据,监控 redis,redis-cli monitor 发现一直没有 get set 操作,请问为何?

添加添加查找数据 ? 需要用到 Cache 的时候才会有的啊,比如

Rails.cache.read("foobar")

需要 登录 后方可回复, 如果你还没有账号请 注册新账号