The TCP_ codes refer to requests on the HTTP port (usually 3128). The UDP_ codes refer to requests on the ICP port (usually 3130). If ICP logging was disabled using the log_icp_queries option, no ICP replies will be logged.
The following result codes were taken from a Squid-2, compare with the log_type enum in src/enums.h:
TCP_HIT A valid copy of the requested object was in the cache.
TCP_MISS The requested object was not in the cache.
TCP_REFRESH_HIT The requested object was cached but STALE. The IMS query for the object resulted in “304 not modified”.
TCP_REFRESH_FAIL_HIT The requested object was cached but STALE. The IMS query failed and the stale object was delivered.
TCP_REFRESH_MISS The requested object was cached but STALE. The IMS query returned the new content.
TCP_CLIENT_REFRESH_MISS The client issued a “no-cache” pragma, or some analogous cache control command along with the request. Thus, the cache has to refetch the object.
TCP_IMS_HIT The client issued an IMS request for an object which was in the cache and fresh.
TCP_SWAPFAIL_MISS The object was believed to be in the cache, but could not be accessed.
TCP_NEGATIVE_HIT Request for a negatively cached object, e.g. “404 not found”, for which the cache believes to know that it is inaccessible. Also refer to the explainations for negative_ttl in your squid.conf file.
TCP_MEM_HIT A valid copy of the requested object was in the cache and it was in memory, thus avoiding disk accesses.
TCP_DENIED Access was denied for this request.
TCP_OFFLINE_HIT The requested object was retrieved from the cache during offline mode. The offline mode never validates any object, see offline_mode in squid.conf file.
TCP_STALE_HIT The object was cached and served stale. This is usually caused by stale-while-revalidate or stale-if-error.
TCP_ASYNC_HIT A background request (e.g., one started by stale-while-revalidate) resulted in a refresh hit.
TCP_ASYNC_MISS A background request (e.g., one started by stale-while-revalidate) resulted in a miss; i.e., the cached object (if any) was updated).
UDP_HIT A valid copy of the requested object was in the cache.
UDP_MISS The requested object is not in this cache.
UDP_DENIED Access was denied for this request.
UDP_INVALID An invalid request was received.
UDP_MISS_NOFETCH During “-Y” startup, or during frequent failures, a cache in hit only mode will return either UDP_HIT or this code. Neighbours will thus only fetch hits.
NONE Seen with cachemgr requests and errors, usually when the transaction fails before being classified into one of the above outcomes.
The following code suffixes are specific to Squid3:
_ABORTED suffix means that the connection with HTTP client was closed or otherwise failed prematurely. This includes half-closed client sockets when half_closed_clients in squid.conf is off.
_TIMEDOUT suffix means that the transaction timed out while writing the response to the HTTP client (i.e., the client was not reading or stopped reading Squid’s response).
The following codes are no longer available in Squid-2:
ERR_* Errors are now contained in the status code.
TCP_CLIENT_REFRESH See: TCP_CLIENT_REFRESH_MISS.
TCP_SWAPFAIL See: TCP_SWAPFAIL_MISS.
TCP_IMS_MISS Deleted, now replaced with TCP_IMS_HIT.
UDP_HIT_OBJ Refers to an old version that would send cache hits in ICP replies. No longer implemented.
UDP_RELOADING See: UDP_MISS_NOFETCH.