Smart Caching systems explained



A caching system stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere. A cached hit occurs when the requested data can be found in a cache, while a cached miss occurs when it cannot. Cache hits are served by reading data from the cache, which is faster than recomputing a result or reading from a slower data store; thus, the more requests that can be served from the cache, the faster the system performs.
Examples of Caching
- WordPress uses caching to serve webpages faster after they have been requested once in a certain period.
- DNS Servers keep records in memory during the Time-Of-Life (TTL) value as configured in the zone.
- In Object Oriented programs like Java the ‘Life’ objects (instantiated) can be kept alive until a certain (Time-To-Live) threshold is reached. After that time the instance is destroyed (invalidated).