如何在rails中获取缓存未命中

时间:2017-11-14 23:11:23

标签: ruby-on-rails

我正在使用Rails.cache进行缓存

config.action_controller.perform_caching = true
config.cache_store = :file_store, "location"

如何检查是否存在缓存缺失?

此外,我无法在日志中看到缓存未命中信息。

由于

1 个答案:

答案 0 :(得分:1)

要获得有关缓存事件的实用通知,请查看ActiveSupport::Notifications订阅cache events