我想弄清楚如何在我的Rails development.log中清除非常分散注意的Cache read: http://localhost:3000/assets/...
语句,这会使我拖慢所有滚动条导致我做(我在Rails 3.2上)。在Rails development.log中为我的所有资产沉默“缓存读取”语句
在我的开发日志中,SQL语句之后,以及对缓存片段(它仍然有用并且我想保留)的读取/写入中,有一长串缓存读取语句用于所有js,css ,以及在请求的页面上使用的图像。只是显示了一把:
Cache read: http://localhost:3000/assets/jquery.atwho.css?body=1
Cache read: http://localhost:3000/assets/jquery.selectric.css?body=1
Cache read: http://localhost:3000/assets/font-awesome.css?body=1
Cache read: http://localhost:3000/assets/480.css?body=1
Cache read: http://localhost:3000/assets/768.css?body=1
我使用的quiet_assets gem作为建议在another SO post,但是这不工作的这些“缓存读取”语句。
是否有一些简单的设置我在config/environments/development.rb
中缺少不输出这些日志?谢谢大家
编辑:这里是我的development.rb设置(我包括任何可能相关的):
config.consider_all_requests_local = true
# cache store
config.action_controller.perform_caching = true
config.cache_store = :dalli_store, nil, {
value_max_bytes: 10485760,
compress: true
}
config.static_cache_control = "public, max-age=2592000"
config.assets.compress = false
config.assets.debug = true
config.assets.logger = false
你可以显示你的'development.rb'配置吗?我在日志中没有看到这样的行,所以可能有一些设置会触发它。 – BoraMa
@BoraMa好的电话,我更新了我的问题,显示'development.rb' config – DelPiero