怪异的缓存与heroku / memcache和dalli问题 [英] Weird cacheing issues with heroku / memcache and dalli

查看:108
本文介绍了怪异的缓存与heroku / memcache和dalli问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑以下几点。从我的heroku控制台:

 >> Rails.cache.stats 
=> {server_id=> {逐出=>0,curr_items=>2064,total_items=>18793,bytes=>7674501 。
>> Rails.cache.clear
=> [true]
>> Rails.cache.stats
=> {server_id=> {evictions=>0,curr_items=>2064,total_items=>18793,bytes=>7674501,

超级奇怪 - 我如何清除缓存!!






类似的问题? : https://stackoverflow.com/q/7122513/192791

解决方案

如果通过控制台直接连接到Dalli / memcahced客户端,并且flush_all缓存清除。


$ b

  dc = Dalli :: Client.new(' localhost:11211')
dc.flush_all

注意:统计信息需要一段时间才能更新,但缓存一定会清除。


Consider the following. From my heroku console:

>> Rails.cache.stats
=> {"server_id"=>{"evictions"=>"0", "curr_items"=>"2064", "total_items"=>"18793", "bytes"=>"7674501", ...
>> Rails.cache.clear
=> [true]
>> Rails.cache.stats
=> {"server_id"=>{"evictions"=>"0", "curr_items"=>"2064", "total_items"=>"18793", "bytes"=>"7674501",

Super weird -- how can I clear my cache!!


Similar Issue ? : https://stackoverflow.com/q/7122513/192791

解决方案

If you connect directly to the Dalli/memcahced client through the console and flush_all the cache clears.

i.e.

dc = Dalli::Client.new('localhost:11211')
dc.flush_all

NOTE: the stats take a while to update, but the cache will definitely clear.

这篇关于怪异的缓存与heroku / memcache和dalli问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆