Hi Alex, 

I have proxy.config.http.cache.cache_responses_to_cookie configured to 1, I 
mean to cache all content although the cookie is present.
If I set that param to 3, the html is not cached and all html content go back 
to the origin servera, so it is not valid for me.

As you say, the site send a cookie when the user is logged (wp_loggin) in but 
the problem is when there is not user logged in, other types of cookies are 
sent too.

I'm using a Wordpress as a backend server and I can modify the code.

In varnish you can create a different hash if an determinare object is present 
or not (like a cookie in this case).

Thanks!


On 10/11/2012, at 09:47, Aleksandrs Andrijenko <[email protected]> wrote:

> Hi Jorge,
> 
> I think you must have some cookies set when the user is logged id, to 
> identify the session.
> 
> By default ATS is not caching Cookie header.
> 
> In that case you need to enable cookie header to be cached and not skipped in 
> records.config.
> 
> proxy.config.http.cache.cache_responses_to_cookies 1;
> 
> Or see documentation of this parameter: 
> Set this variable to specify how Traffic Server caches cookied content:
>   0 = Do not cache any responses to cookies. 
>   1 = Cache all responses to cookies. 
>   2 = Cache responses to cookies of image type only. 
>   3 = Cache all responses to cookies except text content-types (the default)..
> 
> I hope it will resolve your issue.
> 
> Regards,
> Alex
> 
>  
> On Nov 10, 2012, at 9:31 AM, Jorge Román Novalbos wrote:
> 
>> Hi everybody!
>> 
>> I have a big problem, I'm using TS as reverse proxy and i'm trying to cache 
>> a simple web site.
>> Everything is working fine but when the user is logged in the site. In that 
>> moment the nickname should be shown at top of the page but it doesn't happen 
>> because the url has been cached priorly with the same url.
>> 
>> For example:
>> 
>> - www.example.com/cart is cached without any user logged in. Then a user is 
>> logged in the site the page shown is the first one (the page within user 
>> logged in) instead the page with the nickname at top.
>> 
>> My question, It is posible to cache two different version to the same url 
>> depending if a cookie in present or not??. 
>> 
>> Thank in advance.
>> 
>> Jorge
> 

Reply via email to