【发布时间】:2016-04-22 17:04:28
【问题描述】:
我无法确定缓存片段的存储位置。片段缓存的默认位置是什么。
Cached fragment hit: views/listed_products (0.1ms)
我在 rails_root/public 或 rails_root/tmp/cache 目录中找不到任何内容
谢谢, 灰
【问题讨论】:
标签: ruby-on-rails
我无法确定缓存片段的存储位置。片段缓存的默认位置是什么。
Cached fragment hit: views/listed_products (0.1ms)
我在 rails_root/public 或 rails_root/tmp/cache 目录中找不到任何内容
谢谢, 灰
【问题讨论】:
标签: ruby-on-rails
它可能是MemoryStore,如果tmp/cache 不存在则使用它。从当前的帖子中我无法判断它是否真的存在。
【讨论】:
script/console 和 p Rails.cache,除非您使用的是旧版本的 Rails。
试用:
Rails.cache.cache_path
【讨论】: