HTTP Codes and Caching The http response code of a transfered object is the most important criteria on how to store/cache this object. The following table shows HTTP response codes and how the are handled by Squid.

CachingCodeExplainationHTTP
 1xx INFORMATIONAL 
 100Continue>=1.1
 101Switching Protocols>=1.1
 102Extended>=1.1
 2xx SUCCESSFUL 
c200OK>=1.0
 201Created>=1.0
 202Accepted>=1.0
c203Non-Authoriative Information>=1.1
N204No Content>=1.0
 205Reset Content>=1.1
 206Partial Content>=1.1
 220Uses Protocol Extensions>=1.2
 3xx REDIRECTION 
C300Multiple Choices>=1.1
C301Moved Permanently>=1.0
E302Moved Temporarily1.0
E302Found>=1.1
-303See Other>=1.1
-304Not Modified>=1.0
N305Use Proxy (proxy redirect)>=1.1
 307Temporary Redirect>=1.1
 4xx CLIENT ERROR 
N400Bad Request>=1.0
-401Unauthorized>=1.0
 402Payment Required>=1.1
N403Forbidden>=1.0
N404Not Found>=1.0
N405Method Not Allowed>=1.1
 406Not Acceptable>=1.1
-407Proxy Authentication Required>=1.1
 408Request Timeout>=1.1
 409Conflict>=1.1
C410Gone>=1.1
 411Length Required>=1.1
 412Precondition Failed>=1.1
 413Request Entity To Large>=1.1
N414Request-URI Too Long>=1.1
 415Unsupported Media Type>=1.0
 416Requested range not satisfiable>=1.1
 417Expectation Failed>=1.1
 420Bad Protocol Extension Request>=1.2
 421Protocol Extension Unknown>=1.2
 422Protocol Extension Refused>=1.2
 423Bad Protocol Extension Parameters>=1.2
 5xx SERVER ERROR 
N500Internal Server Error>=1.0
N501Not Implemented>=1.0
N502Bad Gateway>=1.0
N503Service Unavailable>=1.0
N504Gateway Timeout>=1.1
 505HTTP Version Not Supported>=1.1
 510Not Extended>=1.1
 520Protocol Extension Error>=1.2
 521Protocol Extension Not Implemented>=1.2
 522Protocol Extension Parameters Not Acceptable>=1.2
 6xx SQUID ERROR 
-600Squid header parsing errorSquid only

C ... Cached
c ... Cached unless a query response without expiry information (i.e. without `Last modified' and `Date' and `Expires' header line)
E ... Cached only if expiry information
N ... Negatively cached if no expiry headers.
- ... Not cached
  ... Unless other said, the response code is not cached


An object is NOT cached, in the following cases: