Ruby on rails Mongoid缓存不';好像不行

Ruby on rails Mongoid缓存不';好像不行,ruby-on-rails,mongodb,mongoid,Ruby On Rails,Mongodb,Mongoid,我想和mongoid cahce合作 首先,我不确定我的标准现在应该放在哪里,它位于类变量中(感觉好像放错了位置) 现在我想我打电话给YearDates.current_year时只会打mongo一次 然而,每当我调用当前的_年时,我会在日志中看到: MOPED: 127.0.0.1:27017 QUERY database=unit_test collection=year_dates selector={"$query"=>{"year"=>2013}, "$ord

我想和mongoid cahce合作

首先,我不确定我的标准现在应该放在哪里,它位于类变量中(感觉好像放错了位置)

现在我想我打电话给YearDates.current_year时只会打mongo一次

然而,每当我调用当前的_年时,我会在日志中看到:

MOPED: 127.0.0.1:27017 QUERY        database=unit_test collection=year_dates selector={"$query"=>{"year"=>2013}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=nil fields=nil 
有什么想法吗?

看看
“Rehevkor 5 7月31日23:13”
MOPED: 127.0.0.1:27017 QUERY        database=unit_test collection=year_dates selector={"$query"=>{"year"=>2013}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=nil fields=nil