rack-funky-cache 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,17 +1,6 @@
1
- = rack-funky-cache
1
+ = Rack Funky Cache
2
2
 
3
- Description goes here.
4
-
5
- == Note on Patches/Pull Requests
6
-
7
- * Fork the project.
8
- * Make your feature addition or bug fix.
9
- * Add tests for it. This is important so I don't break it in a
10
- future version unintentionally.
11
- * Commit, do not mess with rakefile, version, or history.
12
- (if you want to have your own version, that is fine but
13
- bump version in a commit by itself I can ignore when I pull)
14
- * Send me a pull request. Bonus points for topic branches.
3
+ Rack middleware for funky caching content. When request is first served by Rack it is written to disk as static html file. All subsequent requests are then served by webserver and they never reach Rack.
15
4
 
16
5
  == Copyright
17
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -45,8 +45,10 @@ module Rack
45
45
  end
46
46
 
47
47
  def should_cache(env, response)
48
- "text/html" == response[1]['Content-Type'] and 200 == response[0]
48
+ request = Rack::Request.new(env)
49
+ request.get? && request.query_string.empty? &&
50
+ "text/html" == response[1]['Content-Type'] && 200 == response[0]
49
51
  end
50
-
52
+
51
53
  end
52
54
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rack-funky-cache}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mika Tuupola"]
12
- s.date = %q{2010-03-18}
12
+ s.date = %q{2010-03-22}
13
13
  s.description = %q{Funky caching for Rack based applications}
14
14
  s.email = %q{tuupola@appelsiini.net}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mika Tuupola
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-18 00:00:00 +02:00
17
+ date: 2010-03-22 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency