forked from mirrors/gotosocial
[feature] Lower remote media cache config duration (#2007)
The old default of 30d can lead to a lot of media getting cached and significant disk usage, even on small or single person instances. A lot of deployments decrease this value, to 15 or even less. This is less of an issue when using object storage, but for local storage which is the more popular deployment option running out of disk space is unpleasant. With GoToSocial's aim to fit in small places, this changes the default to a much more conservative 7 days. In all likelihood people aren't scrolling that far back in their timeline so this change shouldn't result in any issue. Existing deployments will only be affected by this change if the admin hasn't already configured this value, or didn't bootstrap from the example configuration.
This commit is contained in:
parent
fa57c699fe
commit
da8282081c
4 changed files with 6 additions and 6 deletions
|
@ -37,8 +37,8 @@ media-description-max-chars: 500
|
||||||
#
|
#
|
||||||
# If this is set to 0, then media from remote instances will be cached indefinitely.
|
# If this is set to 0, then media from remote instances will be cached indefinitely.
|
||||||
# Examples: [30, 60, 7, 0]
|
# Examples: [30, 60, 7, 0]
|
||||||
# Default: 30
|
# Default: 7
|
||||||
media-remote-cache-days: 30
|
media-remote-cache-days: 7
|
||||||
|
|
||||||
# Int. Max size in bytes of emojis uploaded to this instance via the admin API.
|
# Int. Max size in bytes of emojis uploaded to this instance via the admin API.
|
||||||
# The default is the same as the Mastodon size limit for emojis (50kb), which allows
|
# The default is the same as the Mastodon size limit for emojis (50kb), which allows
|
||||||
|
|
|
@ -478,8 +478,8 @@ media-description-max-chars: 500
|
||||||
#
|
#
|
||||||
# If this is set to 0, then media from remote instances will be cached indefinitely.
|
# If this is set to 0, then media from remote instances will be cached indefinitely.
|
||||||
# Examples: [30, 60, 7, 0]
|
# Examples: [30, 60, 7, 0]
|
||||||
# Default: 30
|
# Default: 7
|
||||||
media-remote-cache-days: 30
|
media-remote-cache-days: 7
|
||||||
|
|
||||||
# Int. Max size in bytes of emojis uploaded to this instance via the admin API.
|
# Int. Max size in bytes of emojis uploaded to this instance via the admin API.
|
||||||
# The default is the same as the Mastodon size limit for emojis (50kb), which allows
|
# The default is the same as the Mastodon size limit for emojis (50kb), which allows
|
||||||
|
|
|
@ -71,7 +71,7 @@ var Defaults = Configuration{
|
||||||
MediaVideoMaxSize: 40 * bytesize.MiB,
|
MediaVideoMaxSize: 40 * bytesize.MiB,
|
||||||
MediaDescriptionMinChars: 0,
|
MediaDescriptionMinChars: 0,
|
||||||
MediaDescriptionMaxChars: 500,
|
MediaDescriptionMaxChars: 500,
|
||||||
MediaRemoteCacheDays: 30,
|
MediaRemoteCacheDays: 7,
|
||||||
MediaEmojiLocalMaxSize: 50 * bytesize.KiB,
|
MediaEmojiLocalMaxSize: 50 * bytesize.KiB,
|
||||||
MediaEmojiRemoteMaxSize: 100 * bytesize.KiB,
|
MediaEmojiRemoteMaxSize: 100 * bytesize.KiB,
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ var testDefaults = config.Configuration{
|
||||||
MediaVideoMaxSize: 41943040, // 40mb
|
MediaVideoMaxSize: 41943040, // 40mb
|
||||||
MediaDescriptionMinChars: 0,
|
MediaDescriptionMinChars: 0,
|
||||||
MediaDescriptionMaxChars: 500,
|
MediaDescriptionMaxChars: 500,
|
||||||
MediaRemoteCacheDays: 30,
|
MediaRemoteCacheDays: 7,
|
||||||
MediaEmojiLocalMaxSize: 51200, // 50kb
|
MediaEmojiLocalMaxSize: 51200, // 50kb
|
||||||
MediaEmojiRemoteMaxSize: 102400, // 100kb
|
MediaEmojiRemoteMaxSize: 102400, // 100kb
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue