Permalink
Browse files

added verbose rack cache config to core

  • Loading branch information...
1 parent 231f71f commit 9643a905be55882a95c37856052fdd33cecfac8d @keram keram committed May 6, 2012
@@ -34,6 +34,9 @@ Refinery::Core.configure do |config|
# http://markevans.github.com/dragonfly/file.Configuration.html#Configuration
# config.dragonfly_secret = <%= Refinery::Core.dragonfly_secret.inspect %>
+ # Should display some usefull info about resources when you run webserver
+ # config.verbose_rack_cache = <%= Refinery::Core.verbose_rack_cache.inspect %>
+
# Show/hide IE6 upgrade message in the backend
# config.ie6_upgrade_message_enabled = <%= Refinery::Core.ie6_upgrade_message_enabled.inspect %>
@@ -7,7 +7,7 @@ module Core
:menu_hide_children, :menu_css, :dragonfly_secret, :ie6_upgrade_message_enabled,
:show_internet_explorer_upgrade_message, :wymeditor_whitelist_tags,
:javascripts, :stylesheets, :s3_bucket_name, :s3_region, :s3_access_key_id,
- :s3_secret_access_key, :force_ssl
+ :s3_secret_access_key, :force_ssl, :verbose_rack_cache
self.rescue_not_found = false
self.s3_backend = false
@@ -28,6 +28,7 @@ module Core
self.s3_access_key_id = ENV['S3_KEY']
self.s3_secret_access_key = ENV['S3_SECRET']
self.force_ssl = false
+ self.verbose_rack_cache = true
def config.register_javascript(name)
self.javascripts << name
@@ -42,7 +42,7 @@ def attach!(app)
'Dragonfly::Middleware', :refinery_images
app.config.middleware.insert_before 'Dragonfly::Middleware', 'Rack::Cache', {
- :verbose => Rails.env.development?,
+ :verbose => Refinery::Core.verbose_rack_cache,
:metastore => "file:#{Rails.root.join('tmp', 'dragonfly', 'cache', 'meta')}",
:entitystore => "file:#{Rails.root.join('tmp', 'dragonfly', 'cache', 'body')}"
}
@@ -40,7 +40,7 @@ def attach!(app)
'Dragonfly::Middleware', :refinery_resources
app.config.middleware.insert_before 'Dragonfly::Middleware', 'Rack::Cache', {
- :verbose => Rails.env.development?,
+ :verbose => Refinery::Core.verbose_rack_cache,
:metastore => "file:#{URI.encode(Rails.root.join('tmp', 'dragonfly', 'cache', 'meta').to_s)}",
:entitystore => "file:#{URI.encode(Rails.root.join('tmp', 'dragonfly', 'cache', 'body').to_s)}"
}

0 comments on commit 9643a90

Please sign in to comment.