cache_back 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -13,6 +13,11 @@ module CacheBack
13
13
  Rails.cache.write(*args)
14
14
  end
15
15
 
16
+ def delete(*args)
17
+ @local_cache.delete(args[0])
18
+ Rails.cache.delete(*args)
19
+ end
20
+
16
21
  def reset!
17
22
  @local_cache = {}
18
23
  end
@@ -23,6 +23,7 @@ module CacheBack
23
23
 
24
24
  def self.included(model_class)
25
25
  #model_class.after_save :store_in_cache_back
26
+ model_class.after_update :remove_from_cache_back
26
27
  model_class.after_destroy :remove_from_cache_back
27
28
  end
28
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_back
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mick Staugaard