caches_page in Rails 3 does not work in production

Asked

Viewed 88 times

2

In development the caches_page works normally, but in production, it creates the cache and rewrites the cache at each access. Does anyone have any idea how this problem can be solved?

My config/Production.Rb file:

AppRuby::Application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # Code is not reloaded between requests
  config.cache_classes = true

  # 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 = false

  # Compress JavaScripts and CSS
  config.assets.compress = true

  # 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

  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  # the I18n.default_locale when a translation can not be found)
  config.i18n.fallbacks = true

  # Send deprecation notices to registered listeners
  config.active_support.deprecation = :notify

end
  • 3

    Hello, welcome to the site. To format code blcos, start each line with 4 spaces, or select the whole block and click the button {} editor. This time I did it for you, but the next tip.

  • 3

    Please have how you put an example of how you are using the cache.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.