From 24ebeed9ec81856cce3828cee307bc7c68e7ad77 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 25 Oct 2023 00:11:34 +0200 Subject: [PATCH] Feat: control file reference cache --- .env.docker.example | 2 ++ .env.example | 2 ++ config.php | 1 + 3 files changed, 5 insertions(+) diff --git a/.env.docker.example b/.env.docker.example index 5239205..6fec5f5 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -51,6 +51,8 @@ DB_IDLE_TIMEOUT=60 DB_CACHE_TTL="+5 minutes" # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 +# Enable file metadata cache +DB_ENABLE_FILE_REFERENCE_DATABASE=0 # HEALTHCHECK # If server stops responding to requests it will be stoped diff --git a/.env.example b/.env.example index 7a67e77..3805f8f 100644 --- a/.env.example +++ b/.env.example @@ -50,6 +50,8 @@ DB_IDLE_TIMEOUT=60 DB_CACHE_TTL="+5 minutes" # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 +# Enable file metadata cache +DB_ENABLE_FILE_REFERENCE_DATABASE=0 # HEALTHCHECK # If server stops responding to requests it will be stoped diff --git a/config.php b/config.php index ca9a61c..35eb070 100644 --- a/config.php +++ b/config.php @@ -30,6 +30,7 @@ $settings = [ ], 'db' => [ 'enable_min_db' => (bool)filter_var((string)getenv('DB_ENABLE_MIN_DATABASE'), FILTER_VALIDATE_BOOL), + 'enable_file_reference_db' => (bool)filter_var((string)getenv('DB_ENABLE_FILE_REFERENCE_DATABASE'), FILTER_VALIDATE_BOOL), 'type' => (string)getenv('DB_TYPE'), getenv('DB_TYPE') => [ 'uri' => 'tcp://' . getenv('DB_HOST') . ':' . (int)getenv('DB_PORT'),