The project is under development and testing as of 10/2025.
Mnemosyne
Mnemosyne is a small and customizable cache library for Java applications. It uses an in-memory database of values and their respective IDs for every cached type. This allows the simultaneous update of multiple caches at once, thereby allowing for more efficient memory management and easier updates.
Mnemosyne allows the developer to implement domain-specific caching algorithms by simply extending an abstract class. By default, mnemosyne includes implementations of FIFO and LRU.
Mnemosyne currently works with Spring, but more integrations are coming.
Basic idea
The basic idea is that, when multiple Java Methods returning the same object type are cached, it should be possible to update all their caches at once. One can assign a unique ID to a cached object, and that ID can then be used for simultaneous updates of multiple caches.
The objects may be returned from a cache as they are, or as collection elements. Some caches may be subject to conditional updates. Mnemosyne is designed with these considerations in mind.
The basic structure of mnemosyne is easy to understand with a practical example: an application that caches transactions.
When an application calls a Method cached by mnemosyne, the arguments are assembled to a CompoundKey. The CompoundKey is then used to retrieve from a local mnemosyne cache the IDs of the objects to be returned. These objects are stored in a common Value Pool for the object type, mapped to their IDs.
... continue reading