aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/cache.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-09-17 23:53:55 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-09-30 03:32:52 +0530
commite6f21b3d925ea708955c60c400a31fc2e0e36ac0 (patch)
treecb117990190a9c70f777add26ab28228dcab7b79 /yt_dlp/cache.py
parentd710cc6d3660b7bb79cbbefe1f0faec6726b020c (diff)
[docs,cleanup] Some minor refactoring and improve docs
Diffstat (limited to 'yt_dlp/cache.py')
-rw-r--r--yt_dlp/cache.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/cache.py b/yt_dlp/cache.py
index dde9cca64..e5cb193bc 100644
--- a/yt_dlp/cache.py
+++ b/yt_dlp/cache.py
@@ -50,6 +50,7 @@ class Cache(object):
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 @@ class Cache(object):
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: