]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/cache.py
[docs,cleanup] Some minor refactoring and improve docs
[yt-dlp.git] / yt_dlp / cache.py
index dde9cca646090b91c96c5bbf5273ef52be60e3c9..e5cb193bce62309be18869d0e39252a0a405981b 100644 (file)
@@ -50,6 +50,7 @@ def store(self, section, key, data, dtype='json'):
             except OSError as ose:
                 if ose.errno != errno.EEXIST:
                     raise
+            self._ydl.write_debug(f'Saving {section}.{key} to cache')
             write_json_file(data, fn)
         except Exception:
             tb = traceback.format_exc()
@@ -66,6 +67,7 @@ def load(self, section, key, dtype='json', default=None):
         try:
             try:
                 with io.open(cache_fn, 'r', encoding='utf-8') as cachef:
+                    self._ydl.write_debug(f'Loading {section}.{key} from cache')
                     return json.load(cachef)
             except ValueError:
                 try: