Real clients of a web service may benefit from the presence of network and browser caches, which can significantly reduce their perceived response time. However, none of the existing performance measurement techniques provide any information on the impact of caches on web services: what percentage of the files and bytes are delivered from the server comparing with the total files and bytes required for delivering the web service. This impact can only be partially evaluated from web server logs by checking response status code 304, whose corresponding requests are sent by the network caches to validate whether the cached object has been modified. If the status code 304 is set, the cached object is not expired and need not be retrieved again.
To evaluate the caching efficiency of a web service, we introduce two metrics: server file hit ratio and server byte hit ratio for each web page.
For a web page P, assume the objects composing the page are O1, ..., On. Let Size(Oi) denote the size of object Oi in bytes. Then we define NumFiles(P) = n and
Additionally, for each access
Paccessi of the page P, assume
the objects retrieved in the access are
O1i, ..., Okii,
NumFiles(Paccessi) = ki and
define file hit ratio and byte hit ratio for
each page access in the following way: