From 0444f9d6640a6ef639c045ab085fc6cae2ac1aeb Mon Sep 17 00:00:00 2001 From: Mike Orlov Date: Fri, 17 Apr 2020 18:53:47 +0300 Subject: [PATCH] reversed "update" method in multi_cache to overwrite old values with new --- aiocache/decorators.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aiocache/decorators.py b/aiocache/decorators.py index 9b87e6c7..bd09764c 100644 --- a/aiocache/decorators.py +++ b/aiocache/decorators.py @@ -325,8 +325,9 @@ async def decorator( else: kwargs[self.keys_from_attr] = missing_keys - result = await f(*new_args, **kwargs) - result.update(partial) + result = partial + new_items = await f(*new_args, **kwargs) + result.update(new_items) if cache_write: if aiocache_wait_for_write: