Caching & Invalidation

How Mastodon caches preview cards and why there's no universal refresh

Cache duration

Mastodon re-fetches preview card data after 14 days. Until then, the card is served from cache and changes to your tags won’t be reflected on that instance.

Per-instance caching

Every Mastodon instance maintains its own independent cache. A link shared across 100 instances means 100 separate caches, potentially holding different data. There’s no single cache to clear, and nothing comparable to Twitter’s Card Validator or Facebook’s Sharing Debugger exists for the fediverse.

No user-facing refresh

There’s no button for users to force a re-fetch. Once a card is cached on an instance, it stays until the 14-day TTL expires and a new post triggers a fresh fetch.

oEmbed caching

oEmbed responses are cached separately with a 24-hour TTL. If your site provides oEmbed data, changes there propagate faster than changes to Open Graph tags.

Admin CLI tools

Instance administrators can purge cached cards with tootctl:

# Remove preview cards older than a certain number of days
tootctl preview_cards remove --days 7

This is admin-only, affects only the single instance where it’s run, and regular users can’t trigger it.

Workarounds for stale cards

Options are limited:

  • Wait 14 days for natural cache expiry
  • Append a query parameter like ?v=2 so Mastodon treats it as a new URL
  • Contact admins of specific large instances and ask them to clear the card via tootctl
  • Get your tags right before sharing, because once a link is in the fediverse, there’s no coordinated way to fix it