[squid-users] Squid reverse-proxy. How it decides when to refresh?
Amos Jeffries
squid3 at treenet.co.nz
Fri Aug 25 15:18:17 UTC 2017
On 26/08/17 00:37, Alexander Lazarev wrote:
> Hello guys!
> I'm using squid as a reverse-proxy. And I can't understand how squid
> decides when to check for fresh version of file from origin server.
> It looks like for some documents it sends 'If-Modified-Since' or similar
> headers and if it gets 304, it serves file from cache. And for some
> documents it doesn't check for fresh version and always serves from cache. > I was testing that with curl without any additional headers.
> Can some explain how that works or where I can read about that in
> detail?
The HTTP specification RFC 723x series was re-written to be a lot more
easily understood, so those are probably the best place to read up about it.
The features you are asking about are covered in:
Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests
<https://tools.ietf.org/html/rfc7232>
Hypertext Transfer Protocol (HTTP/1.1): Caching
<https://tools.ietf.org/html/rfc7234>
> And is it possible to make squid always check for fresh version
> before serving from cache?
It does when needed. The situation may be clearer after reading the above.
Amos
More information about the squid-users
mailing list