Skip to content
Snippets Groups Projects

Explicitely log a warning when the helper doesn't support cache

Merged Manon Blanco requested to merge cache-explicit-warning-when-unsupported into master
All threads resolved!
Files
2
+ 3
1
@@ -378,11 +378,13 @@ def merge_parents_cache(paths: list, current_database: Path):
def unsupported_cache(func):
def wrapper(self, *args, **kwargs):
results = func(self, *args, **kwargs)
if not self.is_read_only and not self.use_cache:
logger.warning(
f"This API helper `{func.__name__}` did not update the cache database"
)
return func(self, *args, **kwargs)
return results
return wrapper
Loading