Module: MongoMapper::Plugins::AttributeCache::InstanceMethods
- Defined in:
- lib/mongo_mapper_ext/plugins/attribute_cache.rb
Instance Method Summary collapse
Instance Method Details
#cache ⇒ Object
7 8 9 |
# File 'lib/mongo_mapper_ext/plugins/attribute_cache.rb', line 7 def cache @cache ||= {} end |
#clear_cache ⇒ Object
11 12 13 |
# File 'lib/mongo_mapper_ext/plugins/attribute_cache.rb', line 11 def clear_cache @cache = {} end |
#reload ⇒ Object
15 16 17 18 |
# File 'lib/mongo_mapper_ext/plugins/attribute_cache.rb', line 15 def reload @cache.clear if @cache super end |