incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wso...@apache.org
Subject svn commit: r754633 - in /incubator/olio/webapp/rails/branches/caching/config: environment.rb environments/production.rb
Date Sun, 15 Mar 2009 08:41:29 GMT
Author: wsobel
Date: Sun Mar 15 08:41:29 2009
New Revision: 754633

URL: http://svn.apache.org/viewvc?rev=754633&view=rev
Log:
Fix for OLIO-59: Configurable caching still broken, reconfiguration for 2.2.2. Cache not kicking
in correctly

Modified:
    incubator/olio/webapp/rails/branches/caching/config/environment.rb
    incubator/olio/webapp/rails/branches/caching/config/environments/production.rb

Modified: incubator/olio/webapp/rails/branches/caching/config/environment.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/branches/caching/config/environment.rb?rev=754633&r1=754632&r2=754633&view=diff
==============================================================================
--- incubator/olio/webapp/rails/branches/caching/config/environment.rb (original)
+++ incubator/olio/webapp/rails/branches/caching/config/environment.rb Sun Mar 15 08:41:29
2009
@@ -5,14 +5,14 @@
 ENV['RAILS_ENV'] ||= 'production'
 
 # Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
 
 # Bootstrap the Rails environment, frameworks, and default configuration
 require File.join(File.dirname(__FILE__), 'boot')
 require 'hodel_3000_compliant_logger'
 
 CACHED = true
-Memcached = false
+Memcached = true
 
 IMAGE_STORE_PATH = 'public/uploaded_files'
 DOCUMENT_STORE_PATH = 'public/uploaded_files'
@@ -20,7 +20,7 @@
 if CACHED and Memcached
   require 'memcache'
   CACHE = MemCache.new :c_threshold => 1_000,:compression => true,:debug => false,:namespace
=> 'mycachespace',:readonly => false,:urlencode => false
-  CACHE.servers = '10.251.63.95:11211'
+  CACHE.servers = 'r5:11211'
 end
 
 Rails::Initializer.run do |config|
@@ -58,20 +58,15 @@
 
   # Memcached Config ## START ##
   if CACHED and Memcached
-    config.action_controller.session_store = :mem_cache_store
-    config.action_controller.cache_store = CACHE, {}
-    config.action_controller.fragment_cache_store = CACHE, {}
-    config.action_controller.session = {
-    :session_key => '_perf_session'
-    }
-  else
-    config.action_controller.session = {
-    :session_key => '_perf_session',
-    :secret      => 'dab95a8389324e5fa99cf6b178d4377d320b3c94ac2af58946b59118b92d2149a3091bbada03862361ee401e594279022b15fdaeee0df45ee17de07caa912576'
-    }
+    config.action_controller.cache_store = CACHE
   end
   # Memcached Config ## END ##
 
+  config.action_controller.session = {
+    :session_key => '_perf_session',
+    :secret      => 'dab95a8389324e5fa99cf6b178d4377d320b3c94ac2af58946b59118b92d2149a3091bbada03862361ee401e594279022b15fdaeee0df45ee17de07caa912576'
+  }
+
   # Add new inflection rules using the following format
   # (all these examples are active by default):
   # Inflector.inflections do |inflect|
@@ -84,12 +79,6 @@
   # See Rails::Configuration for more options  
 end
 
-if CACHED and Memcached
-  # Memcached Config ## START ##
-  ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.merge!({ 'cache' => CACHE })
-  # Memcached Config ## END ##
-end
-
 # Add new mime types for use in respond_to blocks:
 # Mime::Type.register "text/richtext", :rtf
 # Mime::Type.register "application/x-mobile", :mobile

Modified: incubator/olio/webapp/rails/branches/caching/config/environments/production.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/branches/caching/config/environments/production.rb?rev=754633&r1=754632&r2=754633&view=diff
==============================================================================
--- incubator/olio/webapp/rails/branches/caching/config/environments/production.rb (original)
+++ incubator/olio/webapp/rails/branches/caching/config/environments/production.rb Sun Mar
15 08:41:29 2009
@@ -6,7 +6,7 @@
 
 # Use a different logger for distributed setups
 # config.logger = SyslogLogger.new
-config.log_level = :error
+config.log_level = :debug
 
 # Full error reports are disabled and caching is turned on
 config.action_controller.consider_all_requests_local = false
@@ -23,4 +23,4 @@
     config.action_mailer.raise_delivery_errors = false
     config.action_controller.cache_store = :file_store, RAILS_ROOT + '/tmp/cache/'
   end
-end
\ No newline at end of file
+end



Mime
View raw message