cached_counts 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,11 +10,10 @@ module CachedCounts
10
10
 
11
11
  # Clear out any count caches which have SQL that includes the scopes table
12
12
  def clear
13
- keys = all_keys
14
- invalid_keys = keys.select { |key| key.include?(@scope.table_name.downcase.singularize) }
13
+ invalid_keys = all_keys.select { |key| key.include?(@scope.table_name.downcase.singularize) }
15
14
  invalid_keys.each { |key| Rails.cache.delete(key) }
16
15
 
17
- Rails.cache.write(list_key, keys - invalid_keys)
16
+ Rails.cache.write(list_key, all_keys - invalid_keys)
18
17
  end
19
18
 
20
19
  private
@@ -1,3 +1,3 @@
1
1
  module CachedCounts
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cached_counts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: