cache_store 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cache_store.rb +2 -4
- data/lib/cache_store/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60903e1a173dbf748fc9ab48999c40efbe1853e1
|
4
|
+
data.tar.gz: 868aab69ff4a3756ab914af8235ed5402dd99e57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 280b41390880517b20acf39e6430c6cb1d55aa0425d23fe9978ab20e6593c076f47da3155e3f297a770a11d368c8aa65a32c8895f5acdc75c47abfe7671f9f9e
|
7
|
+
data.tar.gz: 506de091b4e66fb91ca7e16356029d68831890307061010471c4ad833295d72f26c3f2360b764bb7cdf11680717c6b0b640c1e112dbafd00e8f990a5a58425f4
|
data/lib/cache_store.rb
CHANGED
@@ -57,11 +57,9 @@ class LocalCacheStore
|
|
57
57
|
# @param value [Object] This is the value to set within this cache store.
|
58
58
|
# @param expires_in [Integer] This is the number of seconds from the current time that this value should expire.
|
59
59
|
def set(key, value, expires_in = 0)
|
60
|
-
remove(
|
60
|
+
remove(key)
|
61
61
|
expires = nil
|
62
62
|
if expires_in > 0
|
63
|
-
#now = DateTime.now
|
64
|
-
#expires = DateTime.new(now.year, now.month, now.day, 0, 0, expires_in)
|
65
63
|
expires = Time.now.utc + expires_in
|
66
64
|
end
|
67
65
|
@store.push({ key: build_key(key), value: value, expires: expires})
|
@@ -129,4 +127,4 @@ class LocalCacheStore
|
|
129
127
|
end
|
130
128
|
k
|
131
129
|
end
|
132
|
-
end
|
130
|
+
end
|
data/lib/cache_store/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cache_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaughanbrittonsage
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|