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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc6ceea56f2b36fbfc0d166c32b2576e5d0759e3
4
- data.tar.gz: 4a7c6e39bb3c388c520b26f38d91e3b84d355794
3
+ metadata.gz: 6f9dcec4358e48e8b6b18ad80805ce0b6cab0c54
4
+ data.tar.gz: ed599e724c3fd0e3edaee0d94346bc864340b480
5
5
  SHA512:
6
- metadata.gz: 2d0e20f026fd40fae62603b01c6ce278a26c59b5ca8c07e4c6e472d7d8390c178f82634c4eef4992fde6a2b253d16aa92c41cd79058d2bcc3bd09351eb88d8c9
7
- data.tar.gz: 877cc9534be3318caa889ae22d43022df59daf0e67ed12d0a0136bd5aa3b6e0993daea3e3a5ac764fe4771e26f838ff6c71c8e86bd6741def34c138d981a6c6e
6
+ metadata.gz: 7ae70e5790a83ecab1f91148ddce344514c30fcf8e067f8961c777d07e678cbbc505d5ac7385df3f297a609bd6b037af9c394b7b29c5cb87ae7e72233262dd59
7
+ data.tar.gz: 68236e9cfa44f3a159bd8daad5cf269e5a19b0ae0f1665be2af59ca854932f76042530b9d9c6e8468c36d2b12c9ce8e807d483fa2b0cc6d4736e377f8ce60790
@@ -17,7 +17,9 @@ module CacheUtils
17
17
  end
18
18
 
19
19
  def purge_cache
20
- $redis.del(*($redis.scan_each(match: custom_cache_key + '*').to_a + [self.class.cache_key]))
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
@@ -1,3 +1,3 @@
1
1
  module CacheUtils
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
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.3
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-26 00:00:00.000000000 Z
11
+ date: 2017-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler