cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: cayenne in a (rich) client/server setup
Date Wed, 15 Nov 2006 19:36:00 GMT

On Nov 15, 2006, at 2:14 PM, Michael Gentry wrote:

> Named queries and the getObject* will/can use the object cache.

Only if cache policy is set on named queries.

> Normal queries should refresh.

Only if cache policy is not set.

So there is no difference between the queries created in the API and  
mapped in the Modeler as far as caching is concerned:

http://cwiki.apache.org/CAYDOC/caching-query-results.html

DataContext.performQuery(String,Map,boolean) mentioned in the docs  
was a way to refresh the cache that should be considered obsolete now  
(I think).


> I'm not totally clear on the object cache workings.  I know I've had
> things live for weeks in it before (actually helped us out with a
> production problem -- we could get the old data and print it so we
> didn't lose it, but I'd argue that was a bad design decision on my
> part).

Till 3.0 query cache didn't have expiration date. Now it does.

> There was talk about adding new cache options to 3.0, but I
> don't believe you are using that branch?  (I think Andrus may have
> added LRU functionality or similar?)

Yes, and a bit more - an ability to define cache expiration  
algorithms via a factory:

http://www.mail-archive.com/cayenne-user@incubator.apache.org/ 
msg01196.html

Andrus


Mime
View raw message