Module: Cash::Index::Commands
- Included in:
- Cash::Index
- Defined in:
- lib/cash/index.rb
Instance Method Summary collapse
Instance Method Details
#add(object) ⇒ Object
22 23 24 25 |
# File 'lib/cash/index.rb', line 22 def add(object) _, new_attribute_value_pairs = old_and_new_attribute_value_pairs(object) add_to_index_with_minimal_network_operations(new_attribute_value_pairs, object) end |
#delete(object) ⇒ Object
37 38 39 40 41 |
# File 'lib/cash/index.rb', line 37 def delete(object) old_attribute_value_pairs, _ = old_and_new_attribute_value_pairs(object) key = cache_key(old_attribute_value_pairs) expire(key) end |
#remove(object) ⇒ Object
32 33 34 35 |
# File 'lib/cash/index.rb', line 32 def remove(object) old_attribute_value_pairs, _ = old_and_new_attribute_value_pairs(object) remove_from_index_with_minimal_network_operations(old_attribute_value_pairs, object) end |
#update(object) ⇒ Object
27 28 29 30 |
# File 'lib/cash/index.rb', line 27 def update(object) old_attribute_value_pairs, new_attribute_value_pairs = old_and_new_attribute_value_pairs(object) update_index_with_minimal_network_operations(old_attribute_value_pairs, new_attribute_value_pairs, object) end |