The idea of caching is to keep the instances in order to serve them faster than rebuilding them or fetching them from a slow backend. The first-citizen storage is the heap because it is a fast-access solution. However, several cache vendors allow other strategies. Most of the time, it will allow to be pluggable through a Service Provider Interface (SPI), so you will often see a lot of implementations. Here is a small list of the ones you can find:
- Hard disk
- RDBMS database (MySQL, Oracle, and so on)
- NoSQL database (MongoDB, Cassandra, a specific cache server kind of storage, network cache, and so on)
Before discussing the usage of these extensions, don't forget that it is generally a cache-specific way to use ...