rest_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/lib/rest_cache.rb +4 -2
- data/lib/rest_cache/version.rb +1 -1
- metadata +3 -3
data/lib/rest_cache.rb
CHANGED
@@ -57,8 +57,10 @@ module RestCache
|
|
57
57
|
|
58
58
|
purge_expired
|
59
59
|
|
60
|
-
# build a request
|
61
|
-
|
60
|
+
# build a key out of this request
|
61
|
+
key = ''
|
62
|
+
key << @request.session[:session_id].to_s unless @options[:global]
|
63
|
+
key << @request.fullpath
|
62
64
|
|
63
65
|
# return the cached result, if present
|
64
66
|
if @@cache.has_key? key
|
data/lib/rest_cache/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-05-06 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
16
|
-
requirement: &
|
16
|
+
requirement: &73072000 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *73072000
|
25
25
|
description: ! 'RestCache is Rack middleware that relies on HTTP verbs to cache requests
|
26
26
|
to your server application. Every GET request will be cached according to your initialization
|
27
27
|
parameters (see README for more information), and conversely, every PUT/POST/DELETE
|