Module: Cash::WriteThrough::ClassMethods
- Defined in:
- lib/cash/write_through.rb
Instance Method Summary collapse
- #add_to_caches(object) ⇒ Object
- #expire_caches(object) ⇒ Object
- #remove_from_caches(object) ⇒ Object
- #update_caches(object) ⇒ Object
Instance Method Details
#add_to_caches(object) ⇒ Object
55 56 57 |
# File 'lib/cash/write_through.rb', line 55 def add_to_caches(object) indices.each { |index| index.add(object) } end |
#expire_caches(object) ⇒ Object
67 68 69 |
# File 'lib/cash/write_through.rb', line 67 def expire_caches(object) indices.each { |index| index.delete(object) } end |
#remove_from_caches(object) ⇒ Object
63 64 65 |
# File 'lib/cash/write_through.rb', line 63 def remove_from_caches(object) indices.each { |index| index.remove(object) } end |
#update_caches(object) ⇒ Object
59 60 61 |
# File 'lib/cash/write_through.rb', line 59 def update_caches(object) indices.each { |index| index.update(object) } end |