Re: How do the Query/Result caches and the L1 cache work together?


Andy
 
Edited

An L1 cache is an object cache, as defined by the JDO spec. You have an "id" you get the equivalent persistable object. It is used anywhere a persistable object is accessible, and that includes queries if the queries returns a persistable object. The log tells you where objects come from.

Query caching (in DataNucleus, not defined by the JDO spec) is a 3 level process ... generic compilation, datastore compilation, results. Compilations are always cached. Results are only cached when you tell it to cache them, via the query extension datanucleus.query.results.cached
It would make no sense to cache the results of every query for all types of software that use DataNucleus, hence it is off by default.

Join main@datanucleus.groups.io to automatically receive all group messages.