rack-cachely 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/rack-cachely/context.rb +2 -1
- data/lib/rack-cachely/version.rb +1 -1
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/rack-cachely/context.rb
CHANGED
@@ -35,7 +35,8 @@ module Rack
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def is_cacheable?(results)
|
38
|
-
|
38
|
+
status = results[0].to_i
|
39
|
+
return false unless (200...300).include?(status)
|
39
40
|
headers = results[1]
|
40
41
|
control = headers["Cache-Control"]
|
41
42
|
if /public/.match(control) && /max-age=(\d+)/.match(control)
|
data/lib/rack-cachely/version.rb
CHANGED