cache_utils 0.2.3 → 0.2.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_utils/model.rb +3 -1
- 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: 6f9dcec4358e48e8b6b18ad80805ce0b6cab0c54
|
4
|
+
data.tar.gz: ed599e724c3fd0e3edaee0d94346bc864340b480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ae70e5790a83ecab1f91148ddce344514c30fcf8e067f8961c777d07e678cbbc505d5ac7385df3f297a609bd6b037af9c394b7b29c5cb87ae7e72233262dd59
|
7
|
+
data.tar.gz: 68236e9cfa44f3a159bd8daad5cf269e5a19b0ae0f1665be2af59ca854932f76042530b9d9c6e8468c36d2b12c9ce8e807d483fa2b0cc6d4736e377f8ce60790
|
data/lib/cache_utils/model.rb
CHANGED
@@ -17,7 +17,9 @@ module CacheUtils
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def purge_cache
|
20
|
-
|
20
|
+
class_keys = self.class.cache_key
|
21
|
+
class_keys += extra_class_key if respond_to?(:extra_class_key)
|
22
|
+
$redis.del(*($redis.scan_each(match: custom_cache_key + '*').to_a + $redis.scan_each(match: class_keys + '*').to_a))
|
21
23
|
Appsignal.increment_counter('cache_purge', 1) if defined?(Appsignal)
|
22
24
|
end
|
23
25
|
end
|
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.4
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|