Module: Cash::WriteThrough::ClassMethods

Defined in:
lib/cash/write_through.rb

Instance Method Summary collapse

Instance Method Details

#add_to_caches(object) ⇒ Object



57
58
59
# File 'lib/cash/write_through.rb', line 57

def add_to_caches(object)
  indices.each { |index| index.add(object) }
end

#expire_caches(object) ⇒ Object



69
70
71
# File 'lib/cash/write_through.rb', line 69

def expire_caches(object)
  indices.each { |index| index.delete(object) }
end

#remove_from_caches(object) ⇒ Object



65
66
67
# File 'lib/cash/write_through.rb', line 65

def remove_from_caches(object)
  indices.each { |index| index.remove(object) }
end

#update_caches(object) ⇒ Object



61
62
63
# File 'lib/cash/write_through.rb', line 61

def update_caches(object)
  indices.each { |index| index.update(object) }
end