We should ensure that the cached object accessed by the client is same as the object at the originating server at the instant it is being requested for. If a stale object is returned to the client it could lead to wrong results or improper decisions.
To ensure cache coherence we need to estimate as to when a particular object that is cached will be stale. On concluding that an object is stale we could update the copy from the server, or could simply discard the object so that the next time the object is requested it gets the current up-to-date copy of the object. Periodic checks could be made so as to check the timestamp of the cached object with the timestamp of the object at the originating server to see if the cached object is still up-to-date. Information about the validity of the object could be included in the headers while sending the object to the proxy server. Using the information provided by the server in the headers the proxy can then decide as to when the particular object will become stale.
In the following chapters we will see the various methods that can be applied to estimate when an object will become stale.