From d0e57f2535be021621032d7c63592e2e4f32c8ed Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 17 May 2020 22:04:58 +0300 Subject: [PATCH] Decrease default cache_ttl --- src/danog/MadelineProto/Db/ArrayCacheTrait.php | 2 +- src/danog/MadelineProto/MTProto.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Db/ArrayCacheTrait.php b/src/danog/MadelineProto/Db/ArrayCacheTrait.php index dac22356..66ed3ad7 100644 --- a/src/danog/MadelineProto/Db/ArrayCacheTrait.php +++ b/src/danog/MadelineProto/Db/ArrayCacheTrait.php @@ -16,7 +16,7 @@ trait ArrayCacheTrait * @var array */ protected array $cache = []; - protected string $ttl = '+1 day'; + protected string $ttl = '+5 minutes'; private string $ttlCheckInterval = '+1 minute'; private int $nextTtlCheckTs = 0; diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index e71ad4fe..8656aaa9 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -1323,7 +1323,7 @@ class MTProto extends AsyncConstruct implements TLCallback 'database' => 'MadelineProto', //will be created automatically 'max_connections' => 10, 'idle_timeout' => 60, - 'cache_ttl' => '+1 day', //keep records in memory after last read + 'cache_ttl' => '+5 minutes', //keep records in memory after last read ] ], 'upload' => ['allow_automatic_upload' => true, 'part_size' => 512 * 1024, 'parallel_chunks' => 20], 'download' => ['report_broken_media' => true, 'part_size' => 1024 * 1024, 'parallel_chunks' => 20], 'pwr' => [