heroku / memcache和dalli的奇怪缓存问题
考虑以下。 从我的heroku控制台:
>> 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
如果通过控制台直接连接到Dalli / memcahced客户端,则flush_all将清除缓存。
即
dc = Dalli::Client.new('localhost:11211') dc.flush_all
注意:统计信息需要一段时间才能更新,但缓存肯定会清除。
http://devcenter.heroku.com/articles/building-a-rails-3-application-with-the-memcache-addon上的Expiring Cache部分建议使用filter
after_save :expire_contact_all_cache after_destroy :expire_contact_all_cache def expire_contact_all_cache Rails.cache.delete('Contact.all') end
- Heroku和i18n问题
- 使用Git和Heroku进行适当的持续集成和持续部署
- 在部署到Heroku时,为什么Travis无法连接使用Redis cache_store?
- Heroku在我的Ruby on Rails应用程序中找不到文件 – 即使它们就在那里?
- Heroku雪松没有升级到ruby-1.9.3
- 重定向Heroku上的静态资源的子域
- 通过twitter-bootstrap-rails gem升级到bootstrap 2.0.1后,Heroku部署失败
- Heroku push – ExecJS :: RuntimeError:SyntaxError:期望的名称
- Heroku和延迟工作 – 自动缩放分支 – RestClient :: ResourceNotFound