cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Skladaniec <mar...@ish.com.au>
Subject caching documentation
Date Mon, 03 Mar 2008 23:26:03 GMT
Hi

The documentation on caching (http://cayenne.apache.org/doc/caching-and-fresh-data.html 
  and http://cayenne.apache.org/doc/object-caching.html) isn't very  
comprehensive, it does not answer questions like:

- what is actually stored in cache pks? datarows ? objectIds ?
- does caching change when paging is on ?
- does caching require special measures when used with ROP ? (meaning  
the propagation of changes between contexts)
- how to properly use SelectQuery.setCacheGroups()? what happens when  
a query has more than one cache group specified?
- how long the cache entries sit in the memory, is there a way to  
invalidate all cache from time to time ?
- how to invalidate cache using RefreshQuery, the http://cayenne.apache.org/doc/refreshquery.html

  is just a list of suggestions on how it might work in the future.

Me and Ari are willing to document the caching feature, but we would  
need some help.


Another issue is that the following code wont refresh cache:

context.performQuery(new SelectQuery(abc));
context.performQuery(new RefreshQuery(new SelectQuery(abc)));
context.performQuery(new SelectQuery(abc));

while this will:
SelectQuery sq = new SelectQuery(abc);
context.performQuery(sq);
context.performQuery(new RefreshQury(sq));
context.performQuery(sq);

Does it mean that if the setCacheGroups or query name is not specified  
the cache engine uses hashcode() as query/cache entry identifier ?  
This would mean that a query cannot be successfully cached between two  
ROP clients.

With regards
Marcin




Mime
View raw message