【发布时间】:2014-09-24 00:08:26
【问题描述】:
我该如何解决这个问题。请教我如何解决这个问题....
首先,我尝试在我的网络应用程序上使用页面缓存。但是,它运行得并不好。那不是很好。所以,我更新以摆脱页面缓存。之后,我的应用的具有页面缓存的视图页面无法更新。
下面是我的配置/环境/development.rb
KaguShop::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
#caching for objects
#config.cache_store = :mem_cache_store
end
而且,在我编辑缓存设置后,我尝试了这个命令。
※当然,我会重新打开浏览器。
rails console
Rails.cache.clear
【问题讨论】:
-
你使用pow rack server等吗?
-
配置更改后您是否重新加载了服务器?
-
不,我只使用 WEBrick
-
View 中的缓存方法呢?- 你删除了吗?
-
我的缓存方法是“caces_page”。我已经删除了它。
标签: ruby-on-rails ruby caching view browser-cache