无法在rails localhost中使用memcache

时间:2013-09-05 08:02:39

标签: ruby-on-rails ruby-on-rails-3 caching ruby-on-rails-3.2 memcached

我正在使用rails 3.2.13进行开发,并将使用memcache来缓存用户信息。 gem'dalli'可以简化缓存过程。但是,当我运行控制台Rails.cache.write('alice', 'bob')时,它始终返回false。然后,我运行Rails.cache.read('alice')并输出nil

我确保在配置中设置如下,但没有希望。

config.cache_store = :dalli_store
config.action_controller.perform_caching = true
config.cache_classes = true

我忘了设置一些东西吗?请给出建议。谢谢!

0 个答案:

没有答案