Add: option [debug] storage_cache_action for conditional logging

This commit is contained in:
Peter Bieringer
2024-12-14 16:49:54 +01:00
parent 05b8172f8f
commit a7ce8f032c
9 changed files with 33 additions and 5 deletions

View File

@@ -81,6 +81,8 @@ class CollectionPartGet(CollectionPartCache, CollectionPartLock,
# The hash of the component in the file system. This is used to check,
# if the entry in the cache is still valid.
cache_hash = self._item_cache_hash(raw_text)
if self._storage._debug_cache_actions is True:
logger.debug("Check cache for: %r with hash %r", path, cache_hash)
cache_content = self._load_item_cache(href, cache_hash)
if cache_content is None:
with self._acquire_cache_lock("item"):