Class: BlockCache::Record
- Inherits:
-
Object
- Object
- BlockCache::Record
- Includes:
- MongoMapper::Document
- Defined in:
- lib/block_cache.rb
Class Method Summary collapse
Class Method Details
.cache_by_key(block_key, response_body) ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/block_cache.rb', line 56 def cache_by_key(block_key, response_body) record = find_or_initialize_by_block_key(block_key) record.block_response = response_body record.save! return response_body end |