markbates-rack_page_caching 0.1.5 → 0.1.6

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.
@@ -8,11 +8,11 @@ unless ActionController.const_defined?('CONFIGURED_PAGE_CACHING_EXTENSIONS')
8
8
  def caches_page(*actions)
9
9
  before_filter :set_rack_page_caching_header, :only => actions
10
10
 
11
- RAILS_GEM_VERSION.match(/^(\d\.\d)/)
12
- unless $1 >= '2.3'
11
+ # RAILS_GEM_VERSION.match(/^(\d\.\d)/)
12
+ # unless $1 >= '2.3'
13
13
  before_filter :read_from_rack_page_cache, :only => actions
14
14
  after_filter :write_into_rack_page_cache, :only => actions
15
- end
15
+ # end
16
16
  __caches_page(*actions)
17
17
  end
18
18
 
@@ -12,7 +12,7 @@ module Rack
12
12
  request = Rack::Request.new(env)
13
13
  if request.get?
14
14
  begin
15
- page = Cachetastic::Caches::PageCache.get(Rack::PageCaching::Middleware.generate_key(request.fullpath))
15
+ page = Cachetastic::Caches::PageCache.get(Rack::PageCaching::Middleware.generate_key(request.url))
16
16
  if page
17
17
  response = Rack::Response.new
18
18
  response["Content-Type"] = page.content_type
@@ -29,7 +29,7 @@ module Rack
29
29
  res = ret[2]
30
30
  cache_control = Rack::PageCaching::Middleware.cache_controls(res)
31
31
  if Rack::PageCaching::Middleware.cacheable?(request, res.status, res)
32
- Rack::PageCaching::Middleware.set_into_cache(request.fullpath, res.body, res["Content-Type"], cache_control[:max_age])
32
+ Rack::PageCaching::Middleware.set_into_cache(request.url, res.body, res["Content-Type"], cache_control[:max_age])
33
33
  end
34
34
  end
35
35
  return ret
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markbates-rack_page_caching
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-28 00:00:00 -07:00
12
+ date: 2009-05-19 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency