use separator to avoid cache key conflicts

This commit is contained in:
Victor Shyba 2021-04-15 23:33:56 -03:00
parent 1a961e66ff
commit 5f829b048f

View file

@ -199,7 +199,7 @@ class SearchIndex:
self.claim_cache.set(result['claim_id'], result) self.claim_cache.set(result['claim_id'], result)
async def full_id_from_short_id(self, name, short_id, channel_id=None): 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: if key not in self.short_id_cache:
query = {'name': name, 'claim_id': short_id} query = {'name': name, 'claim_id': short_id}
if channel_id: if channel_id: