Module: Mongoid::QueryCache::Query
Overview
Adds behaviour around caching to a Moped Query object.
Instance Method Summary collapse
-
#cursor_with_cache ⇒ CachedCursor
Provide a wrapped query cache cursor.
-
#first_with_cache ⇒ Hash
Override first with caching.
Instance Method Details
#cursor_with_cache ⇒ CachedCursor
Provide a wrapped query cache cursor.
173 174 175 |
# File 'lib/mongoid/query_cache.rb', line 173 def cursor_with_cache CachedCursor.new(session, operation) end |
#first_with_cache ⇒ Hash
Override first with caching.
185 186 187 188 189 |
# File 'lib/mongoid/query_cache.rb', line 185 def first_with_cache with_cache(:first) do first_without_cache end end |