A web cache sits between web servers and a client or many clients, and watches requests for HTML pages, images and files (collectively known as objects), saving a local copy for itself. Then, if there is another request for the same object, it will use the copy that it has, instead of asking the origin server for it again.
There are two main reasons that web caches are used:
- To reduce latency: Because the request is satisfied from the cache (which is closer to the client) instead of the origin server, it takes less time for the client to get the object and display it. This makes websites seem more responsive.
- To reduce traffic: Because each object is only retrieved from the server once, it reduces the amount of bandwidth used by a client. This saves money if the client is paying for traffic, and keeps their bandwidth requirements lower and more manageable.