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 --- docs/configuration/storage.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'docs/configuration') diff --git a/docs/configuration/storage.md b/docs/configuration/storage.md index 0c5b1e9ba..d4e264af3 100644 --- a/docs/configuration/storage.md +++ b/docs/configuration/storage.md @@ -101,7 +101,6 @@ storage-s3-secret-key: "" # Default: "" storage-s3-bucket: "" - # String. Key prefix to use for the S3 storage. # This is optional. # @@ -127,6 +126,18 @@ storage-s3-key-prefix: "" # Examples: ["path", "dns", "auto"] # Default: "auto" storage-s3-bucket-lookup: "auto" + +cache: + # cache.s3-object-info (if set) enables caching + # of S3 object information in the storage driver. + # This can help reduce S3 calls on metered buckets + # by caching simple information like whether an + # object exists, and if so, its size. Left unset, + # the cache will be disabled, which is the default. + # The given value determines the cache capacity. + # Examples: [0, 8000, 16000, 2560000] + # Default: 0 + s3-object-info: 0 ``` ## AWS S3 Configuration -- cgit v1.2.3