mongrel_page_cache_extensions 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ #require 'mongrel_page_cache_extensions'
@@ -0,0 +1,18 @@
1
+ class ActionController::Base
2
+
3
+ def self.m_cache_page(*args)
4
+ # puts "m_cache_page: #{args.inspect}"
5
+ before_filter :set_mongrel_page_cache_header, *args
6
+ end
7
+
8
+ protected
9
+ def set_mongrel_page_cache_header
10
+ if request.get?
11
+ # puts "Setting mongrel page cache header for: #{params[:controller]}/#{params[:action]}"
12
+ response.headers['mongrel_cache_me'] = true
13
+ else
14
+ # puts "Won't set mongrel page cache header because the request was not a GET."
15
+ end
16
+ end
17
+
18
+ end
@@ -0,0 +1,5 @@
1
+ --- !ruby/object:RubyForgeConfig
2
+ gem_name: mongrel_page_cache_extensions
3
+ package: mongrel_page_cache_extensions
4
+ project: magrathea
5
+ version: 1.0.1
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.2
3
+ specification_version: 1
4
+ name: mongrel_page_cache_extensions
5
+ version: !ruby/object:Gem::Version
6
+ version: 1.0.1
7
+ date: 2007-10-24 00:00:00 -04:00
8
+ summary: mongrel_page_cache_extensions
9
+ require_paths:
10
+ - lib
11
+ - lib
12
+ - lib
13
+ - lib/tasks
14
+ email:
15
+ homepage:
16
+ rubyforge_project: magrathea
17
+ description: "mongrel_page_cache_extensions was developed by: markbates"
18
+ autorequire:
19
+ - mongrel_page_cache_extensions
20
+ default_executable:
21
+ bindir: bin
22
+ has_rdoc: false
23
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
24
+ requirements:
25
+ - - ">"
26
+ - !ruby/object:Gem::Version
27
+ version: 0.0.0
28
+ version:
29
+ platform: ruby
30
+ signing_key:
31
+ cert_chain:
32
+ post_install_message:
33
+ authors:
34
+ - markbates
35
+ files:
36
+ - init.rb
37
+ - lib/mongrel_page_cache_extensions.rb
38
+ - lib/tasks/rubyforge_config.yml
39
+ test_files: []
40
+
41
+ rdoc_options: []
42
+
43
+ extra_rdoc_files: []
44
+
45
+ executables: []
46
+
47
+ extensions: []
48
+
49
+ requirements: []
50
+
51
+ dependencies: []
52
+