frontend groundwork
This commit is contained in:
@@ -8,11 +8,19 @@ class DummyClient:
|
||||
def set(self, key, value, **kwargs):
|
||||
self._data[key] = value
|
||||
|
||||
def set_many(self, data, **kwargs):
|
||||
self._data.update(data)
|
||||
|
||||
def get(self, key, **kwargs):
|
||||
return self._data[key]
|
||||
|
||||
|
||||
if constants.MEMCACHE_HOST is None:
|
||||
if constants.MEMCACHED_HOST_PATH is None:
|
||||
client = DummyClient()
|
||||
else:
|
||||
client = Client(constants.MEMCACHE_HOST, timeout=1)
|
||||
client = Client(
|
||||
constants.MEMCACHED_HOST_PATH,
|
||||
timeout=1,
|
||||
allow_unicode_keys=True,
|
||||
encoding='utf-8'
|
||||
)
|
||||
|
Reference in New Issue
Block a user