diff --git a/zulip_bots/zulip_bots/lib.py b/zulip_bots/zulip_bots/lib.py index d7f9023..b6fe334 100644 --- a/zulip_bots/zulip_bots/lib.py +++ b/zulip_bots/zulip_bots/lib.py @@ -164,7 +164,7 @@ def use_storage(storage: BotStorage, keys: List[Text]) -> Iterator[BotStorage]: # calling flush or getting some values that are not previously fetched. data = {key: storage.get(key) for key in keys} cache = CachedStorage(storage, data) - yield storage + yield cache cache.flush() class BotHandler(Protocol):