utopia 0.9.37 → 0.9.38
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/utopia/extensions/rack.rb +4 -2
- data/lib/utopia/version.rb +1 -1
- metadata +3 -3
@@ -9,7 +9,9 @@ class Rack::Response
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def cache!(duration = 3600)
|
12
|
-
self["Cache-Control"]
|
13
|
-
|
12
|
+
unless (self["Cache-Control"] || "").match(/no-cache/)
|
13
|
+
self["Cache-Control"] = "public, max-age=#{duration}"
|
14
|
+
self["Expires"] = (Time.now + duration).httpdate
|
15
|
+
end
|
14
16
|
end
|
15
17
|
end
|
data/lib/utopia/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 119
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 38
|
10
|
+
version: 0.9.38
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Samuel Williams
|