Feat: control file reference cache

This commit is contained in:
Alexander Pankratov 2023-10-25 00:11:34 +02:00
parent 66c9dbd08a
commit 24ebeed9ec
3 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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'),