-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
This bug exists only in Mongoid 3 (testing on 3.0.15). Mongoid 2 doesn't have the bug.
>> foo = Region.all.cache
#<Mongoid::Criteria
selector: {}
options: {:cache=>true}
class: Region
embedded: false>
>> foo.count
MOPED: 127.0.0.1:27017 COMMAND database=gocheap_test command={:count=>"regions", :query=>{}} (0.4489ms)
2
>> foo.count
MOPED: 127.0.0.1:27017 COMMAND database=gocheap_test command={:count=>"regions", :query=>{}} (0.4392ms)
2
So caching stopped working for counts.