I wonder if this solves your issue with Varnish, or if it is too coarse:

https://www.varnish-cache.org/docs/trunk/tutorial/cookies.html

It would seem as a minimum you could identify logged-in-users from 
non-logged-in-users by a the presence of a specific auth-cookie. This would 
certainly accelerate pages for non-logged in users.

I am currently working on pulling basic user info into cached pages via 
javascript; this covers most 'cart contents' and 'hello Jane Smith' type 
feedback scenarios. The graceful fallback is to send the user to a specific 
cart or account page if they don't have js active.

On 31 Jan 2012, at 15:25, jerry wrote:

> Thanks Robert.
> 
> However, the cache needs to, at minimum, differentiate login users
> from non-login users to serve different content, and only a Pyramid
> app aware caching engine can do that.
> 
> Jerry
> 
> On Jan 31, 9:44 pm, Robert Forkel <[email protected]> wrote:
>> hi jerry,
>> if you run your app via paster/gunicorn/whatever proxied by apache or
>> nginx, it is trivial to insert varnish [1] as transparent cache
>> between the frontend and the server serving your pyramid app.
>> regards
>> robert
>> 
>> [1]https://www.varnish-cache.org/
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On Tue, Jan 31, 2012 at 9:16 AM, jerry <[email protected]> wrote:
>>> Hi,
>> 
>>> I wonder if anyone has succeeded in caching the template output. The
>>> main hurdle I'm facing is how to serialize the entire Response object.
>>> I have made a tween to cache the vanilla 200 response.text, but what
>>> about redirect, forbidden, etc, I don't have a solution.
>> 
>>> Any pointer will be much appreciated.
>> 
>>> Jerry
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "pylons-discuss" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to 
>>> [email protected].
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/pylons-discuss?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/pylons-discuss?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to