Human-readable name of persisted class
Human-readable name of persisted class
Cannot assume all values are cached, so always get them from the database
Cannot assume all values are cached, so always get them from the database
First try to fetch from cache, then if not found try to fetch from the database
First try to fetch from cache, then if not found try to fetch from the database
Flushes the cache and then loads all instances of CaseClass
into the cache from the database.
Flushes the cache and then loads all instances of CaseClass
into the cache from the database.
SoftCache
contains "soft" values that might expire by timing out or might get bumped if memory fills up. Mix this trait into the DAO to provide this behavior. DAOs that mix inSoftCache
do not assume that all instances of the case class can fit into memory.SoftCache
finders that return at most one item from querying the cache will access the database, looking for that item after every cache miss. Because of this, thoseSoftCache
finders run more slowly thanStrongCache
finders when the cache does not contain the desired value.SoftCache
finders that return a list of items must always query the database and never look in the cache.The
CachedPersistence
trait implements the default caching strategy. This trait overrides the default finder implementations. This trait is experimental, do not use in production.