next up previous contents
Next: Replacement policies Up: Maintaining the cache Previous: Maintaining the cache

Cacheability

Objects which will be required by users in future need to be cached. While receiving the object the proxy could decide on itself if it would actually be a good idea to cache the object that it is receiving. Here, are some things to be considered before caching the received object.

Firstly, Requests requiring authentication, session-encrypted data, etc should not be cached.Such information about the type of document should be made available in the HTTP header of the document. Whenever such information is absent, these documents are not cached and directly passed to the client. Whenever the client requires to access the same object it will require it to access it again from the originating server and hence will have to pass the authentication procedure for it again. If this object would have been cached, it would have been accessible without authentication by any client.

A second class of documents requiring special attention are those that change very frequently, like news, weather reports, and such. Since these documents may be requested very often in their short lifetime, they should be cached, but updated frequently. If the document is too dynamic such as an online cricket match score board, it may be a better idea not to cache such documents as the document will be stale very soon requiring it to be fetched from the originating server so as to maintain consistency of the document.

Efficient caches cannot be very large, as it will require larger search time so see if the object requested is present in the cache. So another constraint to consider in what should be cached is the document size. If a cache would try to store all the documents, one large document might cause eviction and then reloading of many small documents. This will increase the cache overhead, the bandwidth requirements, and, consequently, the latencies in the Internet. It has been seen that the most requested documents are small about 4KB, a sensible idea would be to put a threshold on the size of cacheable documents. However, a fixed threshold might not work for all the proxies, since the usage patterns differ significantly from one site to another. An adaptive threshold policy can be used:

1.
Start with an initial threshold.
2.
Periodically increase (decrease) the threshold;
3.
if the performance gets better, continue increasing (decreasing) it, otherwise start decreasing (increasing) the threshold.

Besides, it may not be a good idea to cache very large object such as software for download which could be of the order of sizes 10MB, as these objects are usually requested only once.


next up previous contents
Next: Replacement policies Up: Maintaining the cache Previous: Maintaining the cache
Anil Gracias
2001-01-18