From 1e38499e404f15dab47d6a150f623b4f4a2c471c Mon Sep 17 00:00:00 2001 From: perennial Date: Wed, 16 Oct 2024 02:04:36 +1100 Subject: [PATCH] drop default CacheSize to 100 --- config/config.go | 2 +- doc/hosting/environment-variables.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index 3f491b8..89c6102 100644 --- a/config/config.go +++ b/config/config.go @@ -137,7 +137,7 @@ func (s *ServerConfig) LoadConfig() error { s.APIBaseTimeout = 500 * time.Millisecond s.APIMaxBackoffTime = 8000 * time.Millisecond - s.CacheSize = 1000 + s.CacheSize = 100 s.CacheTTL = 5 * time.Minute s.ResponseSaveLocation = "/tmp/pixivfe/responses" diff --git a/doc/hosting/environment-variables.md b/doc/hosting/environment-variables.md index 9e50da7..3904b76 100644 --- a/doc/hosting/environment-variables.md +++ b/doc/hosting/environment-variables.md @@ -205,7 +205,7 @@ PixivFE caches responses from the Pixiv API to improve performance. The followin **Required**: No -**Default:** `1000` +**Default:** `100` Specifies the maximum number of items that can be stored in the cache. This limits the memory usage of the cache.