![]() |
![]() |
One of the major use scenarios for Cacheonix is a level-2 (L2) cache. An L2 cache provides caching services to an object-relational mapping (ORM) framework or a data mapping (DM) framework. An L2 cache hides the complexity of the caching logic from an application.
Cacheonix as an L2 cache improves performance of an ORM or DM framework by reducing unnecessary trips to the database. Cacheonix provides L2 caching for an ORM framework Hibernate and for a DM framework iBatis.
The following communication diagram illustrates using Cacheonix as an L2 cache:

In this use scenario an application does not access Cacheonix directly. Instead, the application utilizes a high level interface provided by an ORM or a DM framework. The framework uses Cacheonix for caching its internal data structures such as mapped objects and database query results. If the cached data is not available, the framework retrieves it from the database and puts it into the cache.