1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #3648 -- Added support for cmemcached Python library. Thanks, floguy@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2007-03-25 23:29:31 +00:00
parent 9c10a2f118
commit a5bb14ed2e
2 changed files with 18 additions and 6 deletions

View File

@@ -3,9 +3,12 @@
from django.core.cache.backends.base import BaseCache, InvalidCacheBackendError
try:
import memcache
import cmemcache as memcache
except ImportError:
raise InvalidCacheBackendError, "Memcached cache backend requires the 'memcache' library"
try:
import memcache
except:
raise InvalidCacheBackendError("Memcached cache backend requires either the 'memcache' or 'cmemcache' library")
class CacheClass(BaseCache):
def __init__(self, server, params):