请考虑以下情况。从我的heroku控制台:heroku/memcache和dalli的奇怪缓存问题
>> 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",
超级奇怪 - 我怎么能清除我的缓存!
相似的问题? :https://stackoverflow.com/q/7122513/192791
您是否试过Rails.cache.read('key')',您知道存储在该缓存中的值是该特定键的值。由于@ b-r-o-s提到的统计信息并不总是立即更新,但是如果你尝试从缓存中读取数据,那么它应该立即返回零。 –
我正在面对类似的东西,我运行Rails.cache.clear,如果我想要重新加载缓存,我必须重新启动我的实例。奇怪的。 – chischaschos