purge tells Bunny to invalidate the cached copy immediately after every upload and delete.
payload.config.ts
Options
Pass
purge: true for defaults, purge: false to disable, or an object to customize:
Requirements
Cache purging is an account-level operation, so it needs a Bunny account API key (not the Storage or Stream key) at the top level, asaccountApiKey:
payload.config.ts
Alternative: timestamp-based cache busting
If you don’t want to manage an account API key,urlTransform.appendTimestamp or thumbnail.appendTimestamp add a changing query parameter to URLs instead. This is simpler to set up, but only busts the cache for browsers that re-fetch the URL — it doesn’t proactively clear Bunny’s edge cache.