OK. So, even if a new query results in individual object cache to be flushed, we are still avoiding DB hits becasue we have query result cache in place.
Does query result cache gets individually flushed, or the only way is group flush [1]? Actually, I want to cache User objects (or query results) forever. User object is retrieved when user logs in using an expression like "user_name=$name and password=$pwd". I want to make sure that whenever a user updates his information the object and query result for that particular user gets flushed, not all the users that were retrieved using "user_name=$name and password=$pwd" expression. Please suggest.
[1]http://cayenne.apache.org/doc/query-result-caching.html
Regards
Nishant
--- On Thu, 28/1/10, Andrus Adamchik <andru..bjectstyle.org> wrote:
From: Andrus Adamchik <andru..bjectstyle.org>
Subject: Re: Individual Object Caching
To: use..ayenne.apache.org
Date: Thursday, 28 January, 2010, 3:36 PM
Yes, a query refreshes cached objects (unless the query itself is served from cache).
Andrus
On Jan 28, 2010, at 11:59 AM, Nishant Neeraj wrote:
> Hi,
>
> I am a bit confused on the way Cayenne handles object-cache. It sounds to me that object-cache gets invalidated [1], whenever a call like this takes place
>
>
loadMenu(){...
> SelectQuery query = new SelectQuery(PaintingType.class, ...);
> return (List<PaintingType>)context.performQuery(query);
> }
> Now, there are multiple users accessing the same page that calls loadMenu(), as per the document [1], for each user Object-Cache for this would be flushed and restores.
>
> [1] http://cayenne.apache.org/doc/individual-object-caching.html
>
> RegardsNishant
>
>
> Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
This archive was generated by hypermail 2.0.0 : Fri Jan 29 2010 - 03:28:03 EST