On 11/1/07, Joe <[EMAIL PROTECTED]> wrote: > Correct me if I'm wrong, but wouldn't this place more load on the > server to to this, as an anonymous user visiting the site for the > first time would start a new session, and therefore bypass the cache?
Sessions aren't created unless you modify a value in the session. If you don't do that for anonymous users, there's no problem. > My main question is this: If I changed the templates so there was only > two versions (one for authenticated users that said log out, and one > for anonymous users that said log in), how could I get the cache > middleware to vary on request.user.is_authenticated, and NOT the value > of > the cookie header? Well, you can do internal caching that varies like that, but HTTP downstream caching's Vary header can't do that. If you want to get fancy, you could issue a different ETag for the two flavors. But it sounds like you want to look at the low-level cache API in any case. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---