当我打开缓存时,Rails正在为我网站的旧版主页提供服务当我关闭它时,Rails提供正确版本的页面。我在production.rb文件中有以下配置:
# Code is not reloaded between requests
config.cache_classes = true
config.static_cache_control = "public, max-age=3600"
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = true
config.assets.css_compressor = :yui
config.assets.js_compressor = :uglify
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
有人知道发生了什么吗?
答案 0 :(得分:0)
Rails正在为您的网页提供缓存版本。
您需要使这些缓存页面过期;试试rake tmp:cache:clear
。