Re: cache in memory
Re: cache in memory
- Subject: Re: cache in memory
- From: Mike Schrag <email@hidden>
- Date: Thu, 12 May 2005 14:01:15 -0400
No, which is weird, but it looks like if isdeep is false, eof won't
even call the lookup-in-cache method (that I could see in the
decompiled version, anyway ... it's a lot of code though, so it's
certainly possible I overlooked something).
On May 12, 2005, at 1:39 PM, Chuck Hill wrote:
I don't recall having had to do that before. I usually use
EOUtilities methods to fetch, but the docs don't mention using
deep. Did you have an abstract superclass?
Chuck
On May 11, 2005, at 7:00 PM, Mike Schrag wrote:
Sure enough, setting my fetch spec to be deep ( fetchSpec.setIsDeep
(true) ) fixes everything up and no more database access! Chalk
one up for jad :)
On May 11, 2005, at 9:50 PM, Mike Schrag wrote:
These are the rules that EODatabase uses to determine when to use
the object cache to evaluate a fetchspec:
if(!_flags_ignoreEntityCaching && eoentity.cachesObjects() &&
eofetchspecification.isDeep() &&
_validateQualifierForEvaluationInMemory
(eofetchspecification.qualifier(), eoentity))
1) _flags_ignoreEntityCaching = I'm checking when this is true,
but it appears to be an internal flag that is only set when the
cache is changing, so we can assume this is probably ok
2) eoentity,cachesObjects() = obvious one, the assumption is that
this is returning the correct value, though it's worthy of a
check :)
3) eofetchspecification.isDeep() = This is very interesting and I
think it's off for my fetch spec! So this quite possibly could
be screwing me
4) _validateQualifierForEvaluationInMemory = This is implemented
as you would expect -- And's and Or's must be composed entirely
of qualifiers, and all the keys must be attributes defined in the
class description
So I'm off to look more into this isDeep restriction to see if
this might be toying w/ me.
ms
On May 9, 2005, at 12:12 PM, Chuck Hill wrote:
On May 8, 2005, at 5:23 PM, Mike Schrag wrote:
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?).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com
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
_______________________________________________
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