use redis for video cache

Signed-off-by: zzls Selfhost <root@selfhost.zzls.xyz>
This commit is contained in:
Emilien Devos
2023-06-10 22:21:38 +02:00
committed by Fijxu
parent b60e056f96
commit 389a2a4a4d
6 changed files with 33 additions and 5 deletions

View File

@@ -373,7 +373,7 @@ def get_video(id, refresh = true, region = nil, force_refresh = false)
video.schema_version != Video::SCHEMA_VERSION # cache control
begin
video = fetch_video(id, region)
Invidious::Database::Videos.update(video)
Invidious::Database::Videos.insert(video)
rescue ex
Invidious::Database::Videos.delete(id)
raise ex