I use Apache 2.2 with mod_proxy to some 3rd party HTTP server.
As it doesn't send any Cache-Control
header, I want to add one of 1 day for response code 200, 5 min for 404 and 0 for any other response code.
So I would something like :
SetEnvIf HttpResponseCode "200" rc_200
SetEnvIf HttpResponseCode "404" rc_404
Header set "Cache-Control" "private, max-age=0"
Header set "Cache-Control" "public, max-age=86400" env=rc_404
Header set "Cache-Control" "public, max-age=86400" env=rc_200