List Info

Thread: Question about Django caching




Question about Django caching
country flaguser name
United States
2007-10-22 10:50:25
I am using the Django cache middleware to cache my site.  I
had to set
	CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True because some content
changes
based upon which user is logged in (Hello, username).

If I go into the template and do some template fragment
caching, will
it ignore the setting above and cache the fragment for
authenticated
users?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Question about Django caching
country flaguser name
United States
2007-10-22 11:21:52
Well, after looking at the code, it appears the template tag
ignores
the CACHE_MIDDLEWARE_ANONYMOUS_ONLY setting.

Thanks to all those who responded!

(PS: I was just kidding)

On Oct 22, 11:50 am, Joe <josephdr...gmail.com> wrote:
> I am using the Django cache middleware to cache my
site.  I had to set
>         CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True because
some content changes
> based upon which user is logged in (Hello, username).
>
> If I go into the template and do some template fragment
caching, will
> it ignore the setting above and cache the fragment for
authenticated
> users?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Question about Django caching
user name
2007-10-22 11:22:22
On 10/22/07, Joe < josephdrosegmail.com">josephdrosegmail.com> wrote:

I am using the Django cache middleware to cache my site. ; I had to set
   ; &nbsp; &nbsp; CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True because some content changes
based upon which user is logged in (Hello, username).

If I go into the template and do some template fragment caching, will
it ignore the setting above and cache the fragment for authenticated
users?

Yes. ; These are two different mechanisms for populating the cache, and CACHE_MIDDLEWARE_ANONYMOUS_ONLY applies only to the cache middlware, not fragment caching.

Karen



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users"; group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to django-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )