Hi there,
I'm struggling to make caching middleware work with i18n middleware,
with no success though (a user can't change the language - since he
gets the first cached language site...). Those nifty decorators for
vary headers don't help too. Same goes for the middleware itself -
I've tried to use this snippet:
http://www.djangosnippets.org/snippets/443/
It makes the i18n finally work with cache but then middleware ignores
auth and doesn't detect that a user has logged out or in.
I've tried numerous variations of middleware order, here is the latest
that works with the snippet:
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
#'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.locale.LocaleMiddleware',
'clubtube.cachewrapper.VaryOnLangCacheMiddleware',
'django.middleware.common.CommonMiddleware',
#'django.middleware.cache.FetchFromCacheMiddleware',
)
:(
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---