From ac877bde815827f7aa1eeb3a6f0513d4c7503ad0 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 10 Nov 2025 12:36:59 +0100 Subject: [performance] add optional S3 object info caching (#4546) This adds an optional S3 object info cache to the S3 storage driver backend (see [here](https://codeberg.org/gruf/go-storage/releases/tag/v0.4.0)) to reduce S3 calls largely during media cleanup operations, but it should also help in other situations cutting back on S3 calls when for example a key is already known to not exist. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4546 Co-authored-by: kim Co-committed-by: kim --- internal/config/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/config/config.go') diff --git a/internal/config/config.go b/internal/config/config.go index dfc919f11..9ee321b56 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -215,7 +215,8 @@ type MediaConfiguration struct { } type CacheConfiguration struct { - MemoryTarget bytesize.Size `name:"memory-target"` + S3ObjectInfo int `name:"s3-object-info" usage:"Enables caching of S3 object information in the storage driver to reduce S3 calls, value is cache capacity."` + MemoryTarget bytesize.Size `name:"memory-target" usage:"Sets a target limit that the application will *try* to keep *most* of its caches within."` AccountMemRatio float64 `name:"account-mem-ratio"` AccountNoteMemRatio float64 `name:"account-note-mem-ratio"` AccountSettingsMemRatio float64 `name:"account-settings-mem-ratio"` -- cgit v1.2.3