Second-level-cache, as the name implies, is a layer of cache that lives between a "primary" cache and a data service/store (relational database, in most cases) to optimize read operations on the service/store. It is different from the primary cache in its lifespan (primary cache being limited to a request lifetime) and capabilities (persist to store, clustering, etc.).
Second-level-cache, as the name implies, is a layer of cache that lives between a "primary" cache and a data service/store (relational database, in most cases) to optimize read operations on the service/store. It is different from the primary cache in its lifespan (primary cache being limited to a request lifetime) and capabilities (persist to store, clustering, etc.).
Second-level-cache is a concept most often encountered in the context of object-persistence frameworks, such as Hibernate. The idea is to allow the persistence engine to maintain a copy of entities that are available in the data service/store so that queries to retrieve them can be fulfilled using a local lookup as opposed to a full roundtrip to the service/store which invariably lives in a different server, thus requiring a network operation and incurring the associated overhead and latency/performance impact.