Merge pull request #8856 from sivel/memcached-factcache-improvements
Memcached factcache improvements
This commit is contained in:
commit
893f15b30b
1 changed files with 2 additions and 2 deletions
4
lib/ansible/cache/memcached.py
vendored
4
lib/ansible/cache/memcached.py
vendored
|
@ -150,7 +150,7 @@ class CacheModule(BaseCacheModule):
|
||||||
self._keys = CacheModuleKeys(self._cache, self._cache.get(CacheModuleKeys.PREFIX) or [])
|
self._keys = CacheModuleKeys(self._cache, self._cache.get(CacheModuleKeys.PREFIX) or [])
|
||||||
|
|
||||||
def _make_key(self, key):
|
def _make_key(self, key):
|
||||||
return "{}{}".format(self._prefix, key)
|
return "{0}{1}".format(self._prefix, key)
|
||||||
|
|
||||||
def _expire_keys(self):
|
def _expire_keys(self):
|
||||||
if self._timeout > 0:
|
if self._timeout > 0:
|
||||||
|
@ -168,7 +168,7 @@ class CacheModule(BaseCacheModule):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def set(self, key, value):
|
def set(self, key, value):
|
||||||
self._cache.set(self._make_key(key), value, time=self._timeout)
|
self._cache.set(self._make_key(key), value, time=self._timeout, min_compress_len=1)
|
||||||
self._keys.add(key)
|
self._keys.add(key)
|
||||||
|
|
||||||
def keys(self):
|
def keys(self):
|
||||||
|
|
Loading…
Reference in a new issue