public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
enable multi-site caching

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1602 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sun Aug 13 14:07:16 -0700 2006
commit  d2c4676e48a627ed86536efc54a5c580e601e2a7
tree    00f4a1672d4e56f934535bdd08212f8ea546240c
parent  7708bbe9af10dd7b225e13325d5f05af69191300
...
37
38
39
40
41
 
 
 
42
43
44
...
37
38
39
 
 
40
41
42
43
44
45
0
@@ -37,8 +37,9 @@ class ApplicationController < ActionController::Base
0
 
0
     def set_cache_root
0
       @site ||= Site.find_by_host(request.host) || Site.find(:first, :order => 'id')
0
- # prepping for site-specific page cache directories, DONT PANIC
0
- #self.class.page_cache_directory = File.join([RAILS_ROOT, (RAILS_ENV == 'test' ? 'tmp' : 'public'), 'sites', site.host])
0
+ if @site.multi_sites_enabled
0
+ self.class.page_cache_directory = File.join([RAILS_ROOT, (RAILS_ENV == 'test' ? 'tmp' : 'public'), 'cache', site.host])
0
+ end
0
     end
0
 
0
     def with_site_timezone
...
58
59
60
61
62
 
 
 
 
63
...
58
59
60
 
61
62
63
64
65
66
0
@@ -58,4 +58,7 @@ end
0
 require 'mephisto_init'
0
 
0
 # turn this on to get detailed cache sweeper logging in production mode
0
-# Mephisto::SweeperMethods.cache_sweeper_tracing = true
0
\ No newline at end of file
0
+# Mephisto::SweeperMethods.cache_sweeper_tracing = true
0
+
0
+# Enable if you want to host multiple sites on this app
0
+# Site.multi_sites_enabled = true
0
\ No newline at end of file
...
16
17
18
19
20
 
 
 
 
21
...
16
17
18
 
19
20
21
22
23
24
0
@@ -16,4 +16,7 @@ config.action_controller.perform_caching = true
0
 # config.action_controller.asset_host = "http://assets.example.com"
0
 
0
 # Disable delivery errors if you bad email addresses should just be ignored
0
-# config.action_mailer.raise_delivery_errors = false
0
\ No newline at end of file
0
+# config.action_mailer.raise_delivery_errors = false
0
+
0
+# Enable if you want to host multiple sites on this app
0
+# Site.multi_sites_enabled = true
0
\ No newline at end of file

Comments

    No one has commented yet.