Caching web content helps improve upon the responsiveness of your websites by reducing the load on backend resources and network congestion. Web caching is performed by retaining HTTP responses and web resources in the cache for the purpose of fulfilling future requests from cache rather than from the origin servers.
Various web caching techniques can be applied to effectively utilize a web cache. The most basic level is client side web caching where a web site user leverages the embedded HTTP cache built within the browser. This is a simplistic measure that can be used to reduce the latency involved with requesting web resources from a website. The caching methodology is based on the HTTP header directives provided by the HTTP response from the origin servers to the browser. The HTTP cache headers provide the details on how long the browser can fulfill future responses from the cache for the requested web content.
On the server side various web caching techniques can be used to improve the performance of a website. Reverse proxy caches or web application accelerators can be placed in front of application and web servers in order to serve a cached version of the HTTP responses retained from them. These caches are implemented by site administrators and act as intermediaries between the browser and origin servers. They are also commonly based on HTTP cache directives.
Another form of server side web caching includes utilizing key/value stores such as Memcached and Redis. Unlike reverse proxies which are used to simply cache the HTTP response for a given HTTP request. A key/value object store can be used to cache any web content desired by the application developer. The web content is retrieved typically by means of application code or use of an application framework that can leverage the In-Memory data store. Another benefit to using key/value stores for web caching is they are also commonly used for storing web sessions and other cached content. This provides a single solution to serve various use cases.