Comment #1 on issue 2538 by Djblets: memcached leakage across instances - when instances run same server domain but different site root

I believe the following patch does the job of fixing this issue against the Djblets project:

diff --git a/djblets/util/ b/djblets/util/
index 5fb8da8..521bfab 100644
--- a/djblets/util/
+++ b/djblets/util/
@@ -193,7 +193,12 @@ def make_cache_key(key):
         site = Site.objects.get_current()

         # The install has a Site app, so prefix the domain to the key.
-        key = "%s:%s" % (site.domain, key)
+        # Also prefix the site root, if there is one, to allow for
+        # multiple instances on the same host.
+        if settings.SITE_ROOT:
+            key = "%s:%s:%s" % (site.domain, settings.SITE_ROOT, key)
+        else:
+            key = "%s:%s" % (site.domain, key)
         # The install doesn't have a Site app, so use the key as-is.

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to