Rails redis_store 如何在 rails2.3.11 使用?

lucifer · March 08, 2012 · Last by huacnlee replied at March 08, 2012 · 3342 hits

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")

You need to Sign in before reply, if you don't have an account, please Sign up first.