After caching the various cacheable objects requested by the client the cache will eventually get full. Thus for a new cacheable document that needs to be cached something else that has already been cached should be evicted from the cache. This requires a replacement policy which will select one or more documents to be evicted from the cache so as to make place for the newly arrived document. There have been many removal policies proposed. The problem is different, from that of replacement in memory and disk caching, since the files are not all the same size.
The basic policy is LRU which is simple and works fine. Other policies are some sort of modified LRU policy which are used to optimize the performance. Some factors to be taken into account are the number of times the document is accessed, size of the document, cost incurred in getting the document, etc.
In the next chapter we will dicuss the different types of policies that can be applied as replacement policies for the web cache.