Hello:
I had a model name's Place, and it have a state field.
I was defined the default_scope for all with state = 1
class Place < ActiveRecord::base
index [:id,:state]
default_scope :conditions=> [:state => 1]
end
when I was used Place.find(278)
First was success, but there output NOT_STORED on Memcached console.
Again it Place.find(278), the Memcached well be endless loop :
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
1872 END
<1872 get Place:1/id/278
1872 END
<1872 get Place:1/id/278/state/1
1872 sending key Place:1/id/278/state/1
Hello: I had a model name's Place, and it have a state field. I was defined the default_scope for all with state = 1 class Place < ActiveRecord::base index [:id,:state] default_scope :conditions=> [:state => 1] end
when I was used Place.find(278) First was success, but there output NOT_STORED on Memcached console. Again it Place.find(278), the Memcached well be endless loop : <1872 get Place:1/id/278/state/1
Why?