summaryrefslogtreecommitdiff
path: root/internal/config/defaults.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-11-10 12:36:59 +0100
committerLibravatar tobi <tobi.smethurst@protonmail.com>2025-11-17 14:13:24 +0100
commitac877bde815827f7aa1eeb3a6f0513d4c7503ad0 (patch)
tree7a315d820a5be3232dd5bfc96857017c38e906fd /internal/config/defaults.go
parent[chore] update dependencies (#4542) (diff)
downloadgotosocial-ac877bde815827f7aa1eeb3a6f0513d4c7503ad0.tar.xz
[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 <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/config/defaults.go')
-rw-r--r--internal/config/defaults.go12
1 files changed, 12 insertions, 0 deletions
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*.