Hi,

I use the latest version of cayenne, 3.0b and am experimenting with the object caching features.

The documentation states that committed objects are purged from the cache because it uses weak references.
(http://cayenne.apache.org/doc/individual-object-caching.html)

If I however run a query using SQLTemplate which caches the objects into the dataContext local cache (objectstore), the objects don't seem to be purged at all. If I simply run the query dump the contents using an iterator on the resulting List then the nr of registered objects in the objectstore stays the same (dataContext.getObjectStore().registeredObjectsCount()). Even if I manually run System.gc() I don't see any changes (I know this can be normal as gc() doesn't guarantee anything)

What am I doing wrong? Under which circumstances will cayenne purge the cache?

tx

Hans

Reply via email to