Memcache Stats Not Outputting with Rails.cache.stats… Rails/Heroku

╄→尐↘猪︶ㄣ 提交于 2019-12-10 23:51:13

问题


Good evening,

I'm trying to do some testing of the caching on my Rails app on Heroku, but Memcachier does not appear to be playing nicely...

I can pull values out of the cache no problem, but the stats doesn't give me any love...

=> "42:Quotes:2012-04-16"
irb(main):016:0> Rails.cache.exist?(str)
=> true
irb(main):017:0> Rails.cache.read(str)
=> {"VCE.TO"=>24.76, "XIU.TO"=>17.19, "EWC"=>27.44}
irb(main):018:0> Rails.cache.stats
=> {"mc1.ec2.memcachier.com:11211"=>{}}    

Should there not be some data in the stats if I can pull information out of the cache? I have the following in my gemfile:

gem 'dalli'
gem 'memcachier'

And the following in production.rb:

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

Any help would be appreciated - I can post more detail as required!

来源:https://stackoverflow.com/questions/10168399/memcache-stats-not-outputting-with-rails-cache-stats-rails-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!