Hello everyone, I'm trying to implement caching for my bilingual site. The problem is that once I enable caching and I change the language (via the example code in http://docs.djangoproject.com/en/dev/topics/i18n/?from=olddocs#the-set-language-redirect-view ), the page does not change. The Content-Language header that the browser receives is indeed changed accordingly, but apparently the caching system is not aware of the change. I've set up my middleware as follows:
MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', # muss vor auth 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', ) I also tried per-site caching (disabling caching in the middleware), but did get the same results, even when I specified vary_on_headers ('Content-Language','Accept-Language'). I have found a snippet (http://www.djangosnippets.org/snippets/443/) that might work, but I'm reluctant to use this hack and also rely on the deprecated CacheMiddleware. Any help and hints are appreciated! Thanks, Maik PS. relevant settings.py excerpt: CACHE_BACKEND = 'locmem:///' CACHE_MIDDLEWARE_SECONDS = 300 CACHE_MIDDLEWARE_KEY_PREFIX = '' CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---