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
50 51 52 53 |
# File 'lib/cash/write_through.rb', line 50 def add_to_caches(object) indices.each { |index| index.add(object) } if cacheable? true end |
#expire_caches(object) ⇒ Object
65 66 67 68 |
# File 'lib/cash/write_through.rb', line 65 def expire_caches(object) indices.each { |index| index.delete(object) } if cacheable? true end |
#remove_from_caches(object) ⇒ Object
60 61 62 63 |
# File 'lib/cash/write_through.rb', line 60 def remove_from_caches(object) indices.each { |index| index.remove(object) } if cacheable? true end |
#update_caches(object) ⇒ Object
55 56 57 58 |
# File 'lib/cash/write_through.rb', line 55 def update_caches(object) indices.each { |index| index.update(object) } if cacheable? true end |