Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #140: memcached backends may now use multiple servers

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2822f71d08f3a94a3e26bb80fa1dbcef7bf2f1db 1 parent f12e324
@jacobian jacobian authored
Showing with 7 additions and 3 deletions.
  1. +4 −2 django/core/cache.py
  2. +3 −1 docs/cache.txt
View
6 django/core/cache.py
@@ -13,7 +13,9 @@
The CACHE_BACKEND setting is a quasi-URI; examples are:
memcached://127.0.0.1:11211/ A memcached backend; the server is running
- on localhost port 11211.
+ on localhost port 11211. You can use
+ multiple memcached servers by separating
+ them with semicolons.
db://tablename/ A database backend in a table named
"tablename". This table should be created
@@ -134,7 +136,7 @@ class _MemcachedCache(_Cache):
"Memcached cache backend."
def __init__(self, server, params):
_Cache.__init__(self, params)
- self._cache = memcache.Client([server])
+ self._cache = memcache.Client(server.split(';'))
def get(self, key, default=None):
val = self._cache.get(key)
View
4 docs/cache.txt
@@ -29,7 +29,9 @@ Examples:
CACHE_BACKEND Explanation
============================== ===========================================
memcached://127.0.0.1:11211/ A memcached backend; the server is running
- on localhost port 11211.
+ on localhost port 11211. You can use
+ multiple memcached servers by separating
+ them with semicolons.
db://tablename/ A database backend in a table named
"tablename". This table should be created
Please sign in to comment.
Something went wrong with that request. Please try again.