Skip to content

Commit

Permalink
Indicate when cache is used via info logger
Browse files Browse the repository at this point in the history
(DIS-2985)
  • Loading branch information
narimantos committed May 22, 2024
1 parent 94cd431 commit 2177273
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dissect/target/helpers/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def call(self, *args, **kwargs):
if os.access(cache_file, os.R_OK, effective_ids=bool(os.supports_effective_ids)):
if os.stat(cache_file).st_size != 0:
try:
target.log.info("Using cache for function: %s", self.fname)
return self.open_reader(cache_file, output)
except Exception as e:
target.log.warning("Cache will NOT be used. Error opening cache file: %s", cache_file)
Expand Down

0 comments on commit 2177273

Please sign in to comment.