lib/mongo/query_cache.rb
# Execute the block while using the query cache.
#
# @example Execute with the cache.
#   QueryCache.cache { collection.find }
#
# @return [ Object ] The result of the block.
Execute the block while using the query cache.
Execute the block while using the query cache .
def cache
        enabled = enabled?
        self.enabled = true
        begin
          yield
        ensure
          self.enabled = enabled
        end
      end
def cache enabled = enabled? self . enabled = true begin yield ensure self . enabled = enabled end end
Execute the block while using the query cache.
Execute the block while using the query cache .
The result of the block.
The result of the block .
 Object 
example
Execute with the cache. QueryCache.cache { collection.find }
Execute with the cache . QueryCache . cache { collection . find }