Re: retrieve() hits db even if obj present in %Live_Objects.

[prev] [thread] [next] [Date index for 2004/06/24]

From: Tim Bunce
Subject: Re: retrieve() hits db even if obj present in %Live_Objects.
Date: 08:30 on 24 Jun 2004
On Thu, Jun 24, 2004 at 05:50:13AM +0100, trlorenz@xxxxxxx.xxx wrote:
> Hi, all.
> 
> Unless I'm mistaken, retrieve() makes a trip to the db even if the object being sought is already present in the CDBI object cache. (Apparently this is because retrieve() is implemented through _do_search(), which has no concept of an id-only lookup.) Only after the data is picked up from the db is the id used for a lookup into the cache (and any fresh data from the db lookup discarded).
> 
> Is this correct?

Yeap. Needs fixing.

> If so, is a fix on anyone's mind? (I can provide a patch if it'll help out.)

The patch ought to be based on my earlier _live_object_key() patch as that'll
make it trivial.

Tony, did you apply the _live_object_key() patch?

Tim.

Re: retrieve() hits db even if obj present in %Live_Objects.
Tim Bunce 08:30 on 24 Jun 2004

Re: retrieve() hits db even if obj present in %Live_Objects.
Takes Tea at Half Past Three 21:40 on 24 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52