Skip to Main Content
Web Caching
book

Web Caching

by Duane Wessels
June 2001
Intermediate to advanced content levelIntermediate to advanced
320 pages
9h 18m
English
O'Reilly Media, Inc.
Content preview from Web Caching

Service Times

Table A-11 shows the mean and median service times for different types of requests. The type is taken directly from the fourth field of Squid’s access.log file. The three-digit number following the slash is the HTTP status code. Here I show only 200 (OK) and 304 (Not Modified) replies.

Table A-11. Mean and Median Service Times by Cache Result (IRCache Data)

TypeMean (sec)Median (sec)
TCP_REFRESH_HIT/2005.1650.281
TCP_MISS/2004.5900.466
TCP_REFRESH_MISS/2004.0910.468
TCP_CLIENT_REFRESH_MISS/2001.8890.215
TCP_HIT/2001.8190.050
TCP_MISS/3041.1510.294
TCP_REFRESH_HIT/3041.1070.219
TCP_IMS_HIT/3040.1020.042

The string before the slash indicates how the cache handled the request. TCP_MISS means the object wasn’t found in the cache at all. TCP_HIT indicates an unvalidated cache hit. TCP_IMS_HIT occurs when Squid receives an If-modified-since request and returns a 304 (Not Modified) reply immediately because the response is fresh according to the local configuration. TCP_CLIENT_REFRESH_MISS means that the user-agent sent the no-cache directive. TCP_REFRESH_HIT occurs when Squid validates its cached response and learns that the object hasn’t changed. If the client’s request includes an If-modified-since header, Squid returns the 304 message. Otherwise, it sends the entire object, and the status is 200. Finally, TCP_REFRESH_MISS means Squid sent a validation request to the origin server, and the cached object was out-of-date.

This data is derived from the second field of Squid’s access.log ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck
NGINX Unit Cookbook

NGINX Unit Cookbook

Derek DeJonghe
NGINX Cookbook

NGINX Cookbook

Tim Butler

Publisher Resources

ISBN: 156592536XCatalog PageErrata