Re: loading many objects from one query

[prev] [thread] [next] [Date index for 2004/09/16]

From: Andrew Pimlott
Subject: Re: loading many objects from one query
Date: 19:17 on 16 Sep 2004
On Thu, Sep 16, 2004 at 10:10:13AM -0700, Randal L. Schwartz wrote:
> And Perrin, I believe I learned from you that caches are tricky
> things, because once you have a cache, you have to figure out *when*
> and *for how long* you can use it.
> 
> For example, if I expect that a ->retrieve call gets me a real
> database hit because someone else is also changing the record, putting
> a cache in the middle will mess me up.

In principle, this is an easy issue to resolve:  You should only cache
for the duration of a transaction.  Any other simple approach is
unreliable, except for data you _know_ will never change, or where you
_know_ that incoherence is harmless.

Of course, this reduces the performance benefit, so people who want
caching might not want it so much in this form.

Andrew

(message missing)

loading many objects from one query
Andrew Pimlott 01:05 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 02:22 on 14 Sep 2004

Re: loading many objects from one query
Tim Bunce 09:09 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 14:21 on 14 Sep 2004

Re: loading many objects from one query
Tim Bunce 16:07 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 16:12 on 14 Sep 2004

Re: loading many objects from one query
Andrew Pimlott 23:05 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 23:22 on 14 Sep 2004

Re: loading many objects from one query
Todd Lorenz 16:13 on 14 Sep 2004

Re: loading many objects from one query
Tim Bunce 13:52 on 15 Sep 2004

Re: loading many objects from one query
Perrin Harkins 15:22 on 15 Sep 2004

Re: loading many objects from one query
merlyn (Randal L. Schwartz) 17:10 on 16 Sep 2004

Re: loading many objects from one query
Andrew Pimlott 19:17 on 16 Sep 2004

Re: loading many objects from one query
Tim Bunce 17:36 on 14 Sep 2004

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