Forum: Ruby on Rails CachedModel anyone?????

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Michael E. (Guest)
on 2006-02-13 18:04
(Received via mailing list)
Can any one help explain this output in my log.  I have memcache-client
and
cached_model setup for a model City but when I run my app, this is the
output I get (this is on a second pass so theoretically the data is
already
in the cache).

MemCache Get (0.000469)  active_record:City:1802387
  City Load (0.001015)   SELECT * FROM cities WHERE (cities.id =
1802387)
LIMIT 1
MemCache Set (0.000776)  active_record:City:1802387
MemCache Set (0.000753)  active_record:City:1802387
MemCache Set (0.000755)  active_record:City:1802387



So it appears to get the object from the cache and yet appears to query
the
dabase again and then set the object into the cache 3 times in t row???

I see this behavior no matter what model I extend from CachedModel so
it's
not just this particular model object that does this.

Thanks
Mike
Eric H. (Guest)
on 2006-02-13 21:47
(Received via mailing list)
On Feb 13, 2006, at 8:01 AM, Michael E. wrote:

> MemCache Set (0.000755)  active_record:City:1802387
>
> So it appears to get the object from the cache and yet appears to
> query the dabase again and then set the object into the cache 3
> times in t row???
>
> I see this behavior no matter what model I extend from CachedModel
> so it's not just this particular model object that does this.

I've had one other report of this, but I won't get a chance to look
into it until after I've fixed the disk space problems for our sites.

--
Eric H. - removed_email_address@domain.invalid - http://segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
This topic is locked and can not be replied to.