rpc-mapper 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rpc_mapper/cacheable.rb +5 -1
- data/lib/rpc_mapper/version.rb +1 -1
- metadata +4 -4
data/lib/rpc_mapper/cacheable.rb
CHANGED
@@ -9,6 +9,10 @@ module RPCMapper::Cacheable
|
|
9
9
|
# TRP: Default to a 5 minute cache
|
10
10
|
DEFAULT_LONGEVITY = 5*60
|
11
11
|
|
12
|
+
def reset_cache_store
|
13
|
+
self.cacheable = RPCMapper::Cacheable::Store.new(DEFAULT_LONGEVITY)
|
14
|
+
end
|
15
|
+
|
12
16
|
protected
|
13
17
|
|
14
18
|
def fetch_records_with_caching(options={})
|
@@ -34,7 +38,7 @@ module RPCMapper::Cacheable
|
|
34
38
|
end
|
35
39
|
|
36
40
|
def enable_caching(options)
|
37
|
-
|
41
|
+
reset_cache_store
|
38
42
|
self.cache_expires = options[:expires]
|
39
43
|
self.cache_record_count_threshold = options[:record_count_threshold]
|
40
44
|
end
|
data/lib/rpc_mapper/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpc-mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Travis Petticrew
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-18 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|