cayenne-user mailing list archives

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

The documentation on caching ( 
  and 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

  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(new RefreshQury(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

View raw message