feat(dev): add option to disable video cache on the database (for development purposes only)

This commit is contained in:
Fijxu 2025-02-24 13:26:52 -03:00
parent b3e24c703d
commit 9f475c1f2a
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4
2 changed files with 3 additions and 1 deletions

View File

@ -219,6 +219,8 @@ class Config
property tokens_server : String = "" property tokens_server : String = ""
property video_cache : Bool = true
{% if flag?(:linux) %} {% if flag?(:linux) %}
property reload_config_automatically : Bool = true property reload_config_automatically : Bool = true
{% end %} {% end %}

View File

@ -60,7 +60,7 @@ module Invidious::Database::Videos
extend self extend self
def insert(video : Video) def insert(video : Video)
DBCache.set(video: video, expire_time: 14400) DBCache.set(video: video, expire_time: 14400) if CONFIG.video_cache
end end
def delete(id) def delete(id)