Re: Internationalization and caching not working!

2006-12-28 Thread Beegee
I am starting to get to understand the problem. I hope. I did the following test. My current middleware settings: MIDDLEWARE_CLASSES = ( "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.gzip.GZipMiddleware", "django.middleware.cache.CacheMiddlew

Re: Internationalization and caching not working!

2006-12-28 Thread Beegee
Jeremy, Thanks for the explanation. I am using mod_python. I will check if my browser are sending Accept-Language. But, I suspect they do. Because, whenever caching is disabled swithing between languages works perfect. If I change for example the language settings in my browser and make for exam

Re: Internationalization and caching not working!

2006-12-26 Thread Jeremy Dunck
On 12/26/06, Beegee <[EMAIL PROTECTED]> wrote: ... > Perhaps there is a bug in locale.py. Should: > > patch_vary_headers(response, ('Accept-Language',)) > > perhaps be: > > patch_vary_headers(response, ('Content-Language',)) ... I made the change mentioned above. But, it simply does NOT work!

Re: Internationalization and caching not working!

2006-12-26 Thread Beegee
However you did make me think. You suggested that the Vary header should include Content-Language. If I look at my response header the Content-Language header looks like: Content-Language: nl and if I switch to English it looks like: Content-Language: en. Obviously. Perhaps there is a bug in l

Re: Internationalization and caching not working!

2006-12-26 Thread Beegee
Jeremy, Thanks for your response. But, I am using the locale middleware from Django itself. And it automatically updates the Vary header. See: django/trunk/django/middleware/locale.py def process_response(self, request, response): patch_vary_headers(response, ('Accept-Language',))

Re: Internationalization and caching not working!

2006-12-26 Thread Beegee
Jeremy, Thanks for your response. But, I am using the locale middleware from Django itself. And it automatically updates the Vary header. See: django/trunk/django/middleware/locale.py def process_response(self, request, response): patch_vary_headers(response, ('Accept-Language',))

Re: Internationalization and caching not working!

2006-12-23 Thread Jeremy Dunck
On 12/23/06, Beegee <[EMAIL PROTECTED]> wrote: But, whenever I switch between the two languages with caching enabled the results are unpredictable. I get a Dutch page when I should get an English one and vice versa. The cache middleware creates it's keys based on the initial response's vary he

Internationalization and caching not working!

2006-12-23 Thread Beegee
I build a Dutch and English website: http://www.localpoint.nl. Traffic to the website is increasing. That is why I am looking at enabling Django caching. However, it does not seem to work! I tried different backends. The file backend for example does not store any files. I also tried memcached.