mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
cache: Remove KEY_PREFIX from keys returned by cache_get_many.
Otherwise code paths that use those keys, like get_old_messages, will incorrectly use the prefix-included keys. This bug in our KEY_PREFIX system results in our memcached caching for get_old_messages always missing. (imported from commit 506c13e06d6f266596ead0b381c324c256e576c3)
This commit is contained in:
@@ -133,7 +133,7 @@ def cache_get_many(keys, cache_name=None):
|
||||
cache_backend = get_cache(cache_name)
|
||||
ret = cache_backend.get_many(keys)
|
||||
memcached_stats_finish()
|
||||
return ret
|
||||
return dict([(key[len(KEY_PREFIX):], value) for key, value in ret.items()])
|
||||
|
||||
def cache_set_many(items, cache_name=None, timeout=None):
|
||||
new_items = {}
|
||||
|
||||
Reference in New Issue
Block a user