Method: Mongo::QueryCache.cache
- Defined in:
- lib/mongo/query_cache.rb
.cache ⇒ Object
Execute the block while using the query cache.
48 49 50 51 52 53 54 55 56 |
# File 'lib/mongo/query_cache.rb', line 48 def cache enabled = enabled? self.enabled = true begin yield ensure self.enabled = enabled end end |