On Fri, Jun 6, 2008 at 2:11 PM, Peter Rowell <[EMAIL PROTECTED]> wrote:
> I'm a little confused. The docs (http://www.djangoproject.com/
> documentation/middleware/#django-middleware-cache-cachemiddleware)
> say, and the code appears to support it, that if
> django.middleware.cache.CacheMiddleware in the MIDDLEWARE_CLASSES
> list, then caching is turned on for the whole site.

Yes. The question here, though, was the interaction of
CacheMiddleware, the anonymous-only caching setting, and other caching
mechanisms. Which is why I ran down what each one of them does in the
face of the anonymous-only caching setting.

> I don't see
> anything in the middleware code that knows anything about the
> cache_page decorator.

The cache_page decorator is actually literally the same code as the
middleware; there's a utility function in Django that can convert a
middleware class to a decorator, and the cache_page decorator is the
result of applying that utility to the CacheMiddleware.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to