mongrel_page_cache_handler 1.6.1 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cacher.rb +2 -1
- data/lib/m_action_controller_base.rb +1 -1
- data/lib/tasks/rubyforge_config.yml +1 -1
- data/lib/utils.rb +4 -2
- metadata +2 -2
data/lib/cacher.rb
CHANGED
@@ -8,7 +8,8 @@ module Mongrel
|
|
8
8
|
if response.status == 200
|
9
9
|
sent = response.header.instance_variable_get("@sent")
|
10
10
|
mcm = sent["mongrel_cache_me"]
|
11
|
-
|
11
|
+
imcm = (sent["ignore_mongrel_cache_me"] || false)
|
12
|
+
if mcm && !imcm
|
12
13
|
case app_config.page_cache_storage
|
13
14
|
when "cachetastic"
|
14
15
|
# file_path = Mongrel::PageCacheHandler::Utils.build_full_file_path(request, true)
|
@@ -8,7 +8,7 @@ class ActionController::Base
|
|
8
8
|
def set_mongrel_page_cache_header
|
9
9
|
if request.get?
|
10
10
|
# puts "Setting mongrel page cache header for: #{params[:controller]}/#{params[:action]}"
|
11
|
-
response.headers['mongrel_cache_me'] =
|
11
|
+
response.headers['mongrel_cache_me'] = !@ignore_page_caching
|
12
12
|
else
|
13
13
|
# puts "Won't set mongrel page cache header because the request was not a GET."
|
14
14
|
end
|
data/lib/utils.rb
CHANGED
@@ -9,9 +9,11 @@ module Mongrel
|
|
9
9
|
if ActionController::Base.perform_caching
|
10
10
|
if request.params[Mongrel::Const::REQUEST_METHOD] == "GET"
|
11
11
|
case request.params[Mongrel::Const::PATH_INFO]
|
12
|
+
when /\.xml$/ ## CHANGEME
|
13
|
+
yield request, response if block_given? ## CHANGEME
|
12
14
|
when /\.[a-zA-Z]*$/
|
13
15
|
else
|
14
|
-
yield request,
|
16
|
+
yield request, response if block_given? ## CHANGEME
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -62,7 +64,7 @@ module Mongrel
|
|
62
64
|
|
63
65
|
def build_path(request)
|
64
66
|
path = request.params[Mongrel::Const::PATH_INFO]# + ActionController::Base.page_cache_extension
|
65
|
-
if path == "/"
|
67
|
+
if path == "/" or path.nil? or path == '' # CHANGEME
|
66
68
|
path = "/index"
|
67
69
|
end
|
68
70
|
path
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: mongrel_page_cache_handler
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.6.
|
7
|
-
date:
|
6
|
+
version: 1.6.4
|
7
|
+
date: 2008-01-08 00:00:00 -05:00
|
8
8
|
summary: mongrel_page_cache_handler
|
9
9
|
require_paths:
|
10
10
|
- lib
|