diff --git a/cachalot/monkey_patch.py b/cachalot/monkey_patch.py index 99471d6..4f3b808 100644 --- a/cachalot/monkey_patch.py +++ b/cachalot/monkey_patch.py @@ -56,8 +56,7 @@ def _get_result_or_execute_query(execute_query_func, cache_key, new_table_cache_keys = frozenset(table_cache_keys) - frozenset(data) if new_table_cache_keys: - for table_cache_key in new_table_cache_keys: - cache.add(table_cache_key, time(), None) + cache.set_many(new_table_cache_keys, time(), None) elif cache_key in data: try: timestamp, result = data.pop(cache_key)