Mastodon admins: Leave the “content cache retention period” blank!

Screenshot of Mastodon admin settings page, with the content cache retention period setting highlighted and a bold caption saying Leave This Blank!

⚠️ If you’re the admin of a Mastodon server, you might have noticed a server setting called “content cache retention period”. Do NOT put any numbers in this, just leave it blank!

What happens if I put numbers in there?

It will start permanently breaking threads on your server that are older than that number of days, without any possibility of restoring them. This setting is not really a cache, because there’s no way of getting the content back later.

Whaaat? Why does this setting even exist?

Apparently it was only intended for announcement servers which wanted to avoid data retention for legal reasons. It isn’t intended by the developers for use on ordinary servers.

So why is such a dangerous and niche setting included on normal servers if it’s not intended for normal servers?

Really good question, it probably shouldn’t be there as most admins will never need it and won’t realise the damage it causes. There is a pull request on Github to move it into a separate “danger zone” section ⧉, which includes technical discussion of the situation.

What about the other settings on the same page, can I use them?

Yes, the other settings are okay to use. It’s just the “content cache retention period” one that needs to stay blank.

Can I set the “Media cache retention period”? Can I set the “User archive retention period”?

Yes, it’s fine to set time limits on the media cache and user archives, because they can be reloaded if needed. It’s only the “content cache” that you need to avoid, because the content it deletes cannot be reloaded.

↩ Back to the front page