From 5f829b048fcd48aa49b489e0393fdff524e8bdaa Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 15 Apr 2021 23:33:56 -0300 Subject: [PATCH] use separator to avoid cache key conflicts --- lbry/wallet/server/db/elasticsearch/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbry/wallet/server/db/elasticsearch/search.py b/lbry/wallet/server/db/elasticsearch/search.py index 057924797..758358d30 100644 --- a/lbry/wallet/server/db/elasticsearch/search.py +++ b/lbry/wallet/server/db/elasticsearch/search.py @@ -199,7 +199,7 @@ class SearchIndex: self.claim_cache.set(result['claim_id'], result) async def full_id_from_short_id(self, name, short_id, channel_id=None): - key = (channel_id or '') + name + short_id + key = '#'.join((channel_id or '', name, short_id)) if key not in self.short_id_cache: query = {'name': name, 'claim_id': short_id} if channel_id: