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/defaults.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/config/defaults.go') diff --git a/internal/config/defaults.go b/internal/config/defaults.go index a4996e5c6..a1b4ec211 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -157,6 +157,18 @@ var Defaults = Configuration{ }, Cache: CacheConfiguration{ + // We purposely leave this unset as + // guesstimating the number of media + // objects a server may have cached + // is quite difficult. + // + // And for example, on my extremely + // well federated single user instance + // I (kim) have over 2.5M media objects + // alone in storage. We'll leave this + // to those on metered S3 to tweak. + S3ObjectInfo: 0, + // Rough memory target that the total // size of all State.Caches will attempt // to remain with. Emphasis on *rough*. -- cgit v1.2.3