Re: cache in memory
Re: cache in memory
- Subject: Re: cache in memory
- From: Chuck Hill <email@hidden>
- Date: Mon, 9 May 2005 09:12:30 -0700
On May 8, 2005, at 5:23 PM, Mike Schrag wrote:
I have essentially a graph structure with, for the sake of discussion,
Node and NodeStructure (references ParentNode, ChildNode) entities. A
Node has parentStructures() and childStructures() that return the
corresponding list. I tried setting both Node and NodeStructure as
Cache in Memory and then traverse these relationships. On the first
call to get the root nodes, I would have expected to see one query
that loads all of the Node entities, then in memory filter the root
nodes. On the first call to childStructures() I would have expected
to see one more query to load all the NodeStructure entities and then
again filtering of specifically the children of THIS node, would
happen in memory. Instead I see basically just regular DB access
happening as if I never specified Cache In Memory at all.
What you are expecting to see is what I would expect to see. Are you
using vexCode? Is it possible that it is used an older, cached version
of the model without the Cache in Memory settings? Sometimes vexCode
likes to play games. I've also never used it in the exact setup that
you have. It is possible you have hit a bug.
So basically to traverse this graph, I would have expected TWO
queries, and instead I see lots of them. Is there anything else I
should be setting? Are there any development commandline flags that
might be set that would override the requested behavior?
(WOCachingEnabled is strictly the WOs, not EO, right?).
Yes, just the WO templates.
Chuck
On May 8, 2005, at 8:03 PM, Chuck Hill wrote:
Unless something has changed, the docs are correct. The first
reference to
any of the entity's objects will fetch all such objects into memory.
Any
subsquent fetches or fired faults will only go as far as the snapshot
layer. There should be no further DB access. I've verified this
recently
with 5.2.3.
Are you perhaps using a fetch spec with "refreshes refetched objects"
set
to true? I'm not sure what would happen in that case.
Chuck
At 07:13 PM 08/05/2005 -0400, Mike Schrag wrote:
So the docs for "cache in memory" on an entity make it sound like WO
won't need to hit the database again after the first full load. I'm
not seeing this behavior at all, though, which leads me to believe
I've misunderstood this flag. Even with cache in memory, I still see
queries to retrieve entities of the particular type that i flagged.
What is the actual definition of this field?
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
chill@global-villag
e.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden