cache_method 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cache_method/config.rb +2 -2
- data/lib/cache_method/epoch.rb +2 -1
- data/lib/cache_method/version.rb +1 -1
- data/lib/cache_method.rb +1 -1
- metadata +4 -4
data/lib/cache_method/config.rb
CHANGED
@@ -33,7 +33,7 @@ module CacheMethod
|
|
33
33
|
@storage || raise("You need to set CacheMethod.config.storage with a cache storage of your choice")
|
34
34
|
end
|
35
35
|
|
36
|
-
# TTL for method caches. Defaults to
|
36
|
+
# TTL for method caches. Defaults to 24 hours or 86,400 seconds.
|
37
37
|
#
|
38
38
|
# Example:
|
39
39
|
# CacheMethod.config.default_ttl = 120 # seconds
|
@@ -42,7 +42,7 @@ module CacheMethod
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def default_ttl #:nodoc:
|
45
|
-
@default_ttl ||
|
45
|
+
@default_ttl || 86_400
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/lib/cache_method/epoch.rb
CHANGED
data/lib/cache_method/version.rb
CHANGED
data/lib/cache_method.rb
CHANGED
@@ -40,7 +40,7 @@ module CacheMethod
|
|
40
40
|
#
|
41
41
|
# Note: Remember to define <tt>#hash</tt> on any object whose instance methods might get cached.
|
42
42
|
#
|
43
|
-
# Note 2: Check out CacheMethod.config.default_ttl... the default is
|
43
|
+
# Note 2: Check out CacheMethod.config.default_ttl... the default is 24 hours.
|
44
44
|
#
|
45
45
|
# Example:
|
46
46
|
# class Blog
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cache_method
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Seamus Abshere
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-22 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|