cache_utils 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cache_utils/controller.rb +5 -3
- data/lib/cache_utils/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: dc6ceea56f2b36fbfc0d166c32b2576e5d0759e3
|
4
|
+
data.tar.gz: 4a7c6e39bb3c388c520b26f38d91e3b84d355794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d0e20f026fd40fae62603b01c6ce278a26c59b5ca8c07e4c6e472d7d8390c178f82634c4eef4992fde6a2b253d16aa92c41cd79058d2bcc3bd09351eb88d8c9
|
7
|
+
data.tar.gz: 877cc9534be3318caa889ae22d43022df59daf0e67ed12d0a0136bd5aa3b6e0993daea3e3a5ac764fe4771e26f838ff6c71c8e86bd6741def34c138d981a6c6e
|
@@ -31,9 +31,11 @@ module CacheUtils
|
|
31
31
|
return cached
|
32
32
|
end
|
33
33
|
Appsignal.increment_counter('cache_miss', 1) if defined?(Appsignal)
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
if block_given?
|
35
|
+
fresh = yield
|
36
|
+
$redis.set(key, fresh)
|
37
|
+
fresh
|
38
|
+
end
|
37
39
|
end
|
38
40
|
|
39
41
|
def serialize_for_cache(object, options = {})
|
data/lib/cache_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cache_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michele Finotto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|