On 5/05/2013 5:06 p.m., Markus Koelle wrote:
>>> is it possible to set different response headers Cache-Control by
>>> urlpath_regex (squid3.1.20)?
>>
>> max-age is a property only the origin server is able to accurately
>> measure and set. *Why* are you trying to set it in a gateway proxy?
>>
>> Also, why type of proxy setup do you have?
>>
>
> I've a reverse squid proxy (accelerator mode) before an apache
> backend. The apache origin server sends correct CC headers (request
> headers) for html and images, but I want send different
> response CC-headers by squid reverse proxy to the client.
Take a close look at what you want to gain by altering those metrics.
* Increase max-age and clients refresh slower, BUT your Squid HIT
ratio drops and pushes more load onto the backend. More backend load
more Cost and lower service capacity.
* Decrease max-age and clients refresh faster, BUT your Squid will
only serve them the cached copy and spends more bandwidth doing so. More
bandwidth used more Cost and lower service capacity.
Either way, if its good for clients to cache for X period of time why
not save the expenses and cache for the same in your Squid? The benefit
of having a Squid a reverse-proxy is to amortize the resource
expenditure of new visitors across the resource costs already paid by
earlier visitors to the same URL - *raising* capacity and decreasing
costs. Unbalancing the caching parameters can only decrease the
usefulness of your Squid cache.
Wanting to avoid those pesky no-cache requests and responses? upgrade to
Squid-3.2 which can cache them properly.
If you still want to provide different max-age to clients and Squid look
at the s-maxage cache control or the Surrogate-Control header. You may
need to upgrade to 3.2 for this Surrogat header, you can identify a
Squid with support because in reverse-proxy traffic they send
Surrogate-Capabilities header to the backend servers on all requests.
Amos
Received on Sun May 05 2013 - 07:24:01 MDT
This archive was generated by hypermail 2.2.0 : Sun May 05 2013 - 12:00:03 MDT