Cache that keeps fetched instances in memory.
Three modes (defined for <database > or for <entity > in model.xml :
- NO_CACHE (cache='none', the default) : no caching occurs on this entity.
- SOFT_CACHE (cache='soft') : caching occurs as long as memory is ont reclaimed (see the behaviour of java soft references).
- FULL_CACHE (cache='full') : the whole table is loaded into the cache at startup.
For an entity's instances to be cached, the associated table must have a primary key (even if multivalued).
Warning: Velosurf will invalidate entries on single row update and delete queries, but global updates and deletes are not taken into account.
This caching mechanism is meant for straightforward optimizations in simple situations, for instance to
avoid re-fetching the loggued user at each request.
author: Claude Brisson |