Re: Cached EO Objects
Re: Cached EO Objects
- Subject: Re: Cached EO Objects
- From: Art Isbell <email@hidden>
- Date: Sun, 25 Jul 2004 15:20:25 -1000
On Jul 25, 2004, at 2:31 PM, Lotsa Cabo wrote:
In this scenario, will the database be hit again? If so, I assume EO
will evaluate the rows returned (a single row) and determine if the
object is already within the editing context. Unfortunately, the trip
will already be made to the database. Is this correct?
The determination will be made whether the fetched object is in the EO
cache, not whether it's in a particular editing context. If it is and
it's not older than the fetch timestamp for the editing context, the
fetched object will be discarded by default with the existing cached
object remaining valid.
Actually, I
assume that any time a fetch specification is used, the database will
be hit again, no?
I can't think of a situation in which this isn't true.
I guess the more I read about cached EO objects, the more confused I
become.
I repeat my recommendation that everyone who uses EOF download James
Dempsey's WWDC FreshnessExplorer example. It really helps clear up
this sort of confusion. After logging in to your Apple Developer
Connection account, click "Download Software" and "WWDC -
Enterprise/IT". Then download the topmost "629 - Using WebObjects EOF"
disk image. I probably should have revisited FreshnessExplorer before
attempting to reply :-)
For example, if I want all
"Messages" where the email address is from "1@2.3" I would assume that
the database will always be hit, even if I have objects cached in the
editing context. I mean, if not, then how will it be possible to know
if there are any new objects in the database?
Exactly!
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.