From 4b7335f7137c587e775013d49bccc28bc32387c8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 4 May 2010 10:53:40 -0500 Subject: Add a hacked version of Django UpdateCacheMiddleware This is to address a rather large issue with caching of feed objects in Django. Because they are built up using an XML library that does multiple writes on a file-like object, a single feed object, even when pulled from memcached, generates 1582 writes to the open socket rather than the optimal one it could do. Some version of this fix will be making it upstream, but I need to figure out how to approach that before I do so and for now this will address one of our larger performance issues on the live site since the packages feed is hit as often as it is. Signed-off-by: Dan McGee --- settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 61ed067c..88adf19d 100644 --- a/settings.py +++ b/settings.py @@ -43,7 +43,7 @@ TEMPLATE_LOADERS = ( ) MIDDLEWARE_CLASSES = ( - 'django.middleware.cache.UpdateCacheMiddleware', + 'main.middleware.UpdateCacheMiddleware', "django.contrib.sessions.middleware.SessionMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", 'django.middleware.http.ConditionalGetMiddleware', -- cgit v1.2.3-55-g3dc8