From: "David E Jones" <[email protected]>
Do you mean these comments:
======================
I see there is a little overhead in code due to calls to ecaRunner.evalRules
with EV_CACHE_CHECK/ EV_CACHE_PUT and
getFromPrimaryKeyCache/putInPrimaryKeyCache when actually the entity is not
cacheable but it would be largely compensated by real
use of cache when it's cacheable since it's most cases. To optimize, for the cases the entity is not cacheable , we could then
later
replace useCache=true by false
======================
Yes
Those comments address the mechanism of doing so, and one possible issue with overhead in a certain configuration, but they don't
address the general idea of should we really cache everything by default or not.
So what do you think: should we cache everything by default?
Yes I think so. At least there are a lot of places in OOTB code where Entity Cache should be used and is not. Maybe it's history,
not sure...
What would be the benefit of doing so?
Better performance in most cases. A little overhead after turning to all cached. Could be easily fixed by checking where not cached
Entities are used and replace there with not cached version of find methods
What sorts of problems might we cause by doing so?
Actually I think that's the question everybody is asking her/himself. This because of insconsistency in current code where some find
should be cached and are not. I can see only the overhead I noted and it could be easily avoided, because there are much more cached
Entities than not cached. I don't see any other problems. Maybe I miss something, because I did not went deep in code, but from a
functional POV I don't think so. So a global change to cached and then local fixes to prevent the overhead is what I'm thinking
about.
Jacques
-David
On Apr 21, 2011, at 10:23 AM, Jacques Le Roux wrote:
Hi David,
I have tried to explain my POV a bit more later in the thread.
Jacques
From: "David E Jones" <[email protected]>
Jacques,
Are you proposing that by default we cache all find operations?
What are the benefits you are hoping for, and the issues you have considered?
-David
On Apr 21, 2011, at 1:11 AM, Jacques Le Roux wrote:
Hi,
It would not be a big work effort to replace,and later use only, all findByPrimaryKey, findByAnd and also findList in Groovy
and Java files by their cache overloads (or useCache for findList).
Is there a reason it has not been done yet? I can't see one.
Thanks
Jacques