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
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
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!
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
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',))
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',))
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
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.
8 matches
Mail list logo