In applications, a cache is a high-speed data storage layer that stores a subset of data, typically transient in nature, so that future requests for that data are served up faster than is possible by accessing the data’s primary storage location. Thus, a cache's primary purpose is to increase data retrieval performance by reducing the need to access the underlying slower storage layer (e.g., database). Trading off capacity for speed, a cache typically stores a subset of data transiently, in contrast to databases whose data is usually complete and durable.
You typically use cache to store data retrieved from the database using an access key. Then, next time the same data is requested, you can serve it from the faster cache instead of retrieving it from the database.
Through caching, Altogic allows you to efficiently reuse previously retrieved or computed data which can significantly improve response times of your services. Below is the list of caching capabilities of Altogic that you can use in your service designs.
- You can cache a single object or a list of objects.
- You can set the expiry duration for cached objects. With an expiry duration, the cached objects are deleted automatically from the cache after a specified unit of time.
- You can get cached objects and, if needed, also remove them from the cache.