Delete keys and flush a database
Remove one key, a selection, every match or a whole database.
In short
Delete one key, a selection, every key matching a pattern, or flush a whole database. Deleting is immediate and permanent - a cache has no recycle bin - and Production never allows it.
Before you start
- Who: deleting needs Edit; flushing is for the connection's managers. Production never allows either.
- Plan: a delete counts as one command.
- First: scan with the same pattern, so you see what will go. A cache has no recycle bin.
Delete keys
- Scan with the same pattern first, so you see what will go. * matches everything in the database.
- Delete one key with the trash icon in the inspector, or tick rows and press "Delete selected".
- For every match, open the "…" (More actions) menu and choose Delete every key matching the pattern.
- The dialog counts the matching keys first and lists some of them. Check the count, then confirm. A message says how many keys were removed.
What each action removes
Good to know
- Flushing is for the connection's managers.
- A pattern with no literal character - *, ?*, [a-z]* - matches every key, so it counts as a flush: only managers may run it, the tier's flush rule applies and you type the connection name. Narrower patterns, such as session:*, need Edit.
- On Preprod and Staging a flush is refused unless your operator allowed it. Typing the name correctly does not override that.
- A count that reaches the delete limit (100,000 keys by default) or takes more than a few seconds says "at least"; one delete removes up to the limit, so run it again for the rest.
- The name to type is case-sensitive and must match the rail, including spaces and brackets.
If something goes wrong
- Fewer keys removed than expected: some had expired, or a pattern delete reached its cap. Run it again.
- "Type the connection's name exactly to confirm a flush."
- "Flushing a Staging connection is refused unless the deployment allows it."
- "At most … keys per request - use a pattern delete for more."
Related
- /help/cache-tester/connection-tiers
- /help/cache-tester/read-the-audit-trail
- /help/cache-tester/browsing-and-editing-keys