Cache List β
The Cache List widget (CacheList) is a read-only admin tool for inspecting keys and values stored in the shared Valkey (Redis-compatible) cache. It ships with the workbench via the raclette__cache plugin and is intended for operators and developers who need to debug cache contents without using a separate Redis client.
Admin only
Both the widget UI and its backend routes require an authenticated admin user (user.isAdmin). Non-admin users cannot access cache data through this interface.
Default setup β
The workbench seed configuration includes:
| Item | Default |
|---|---|
Composition _id | cacheList |
| Pathname | cache-list |
| Widget | CacheList (pluginKey: raclette__cache) |
| Interaction link | Cache in the main navigation (mdi-database) |
You can move, rename, or duplicate the composition like any other workbench composition. The widget itself does not expose options in the composition wizard (no cog icon on the widget tile); all runtime controls are in the widget toolbar.
See Compositions and Interaction Links for general layout and navigation setup.
Connection β
The backend connects to Valkey using the CACHE_URL environment variable (for example redis://cache:6379). The explorer opens a short-lived client per request and does not write to the cache.
Database index: the widget defaults to DB 0. Many raclette deployments store application cache data on DB 1 (as configured in raclette.config). Use the DB selector in the toolbar to switch between databases 0β15.
List view β
The list view loads cache keys via SCAN (non-blocking) and shows one row per key.
Toolbar options β
| Control | Description |
|---|---|
| DB | Valkey logical database (0β15). Changing DB reloads from the first page. |
| Key pattern | Optional SCAN match pattern. Leave empty to list all keys (grouped by key prefix). Examples: billing:*, *session*. |
| Fetch batch | Page size for each request: 25, 50, 100, 200, or 500 (maximum). |
| Key | Autocomplete to jump directly to a key. Opens the value table for that key. |
| Refresh | Reload from offset 0 with the current filters. |
| Load more | Append the next page when more keys exist. |
Columns β
| Column | Description |
|---|---|
| Group | Key prefix: segment before the first : or ., or (ungrouped) if neither exists. Shown when listing all keys without a pattern. |
| Key | Full Valkey key. |
| TTL | Time to live: seconds remaining, no expiry, or missing. |
| Value | Preview of the stored value. JSON values are shown as compact JSON. Truncated values show a warning chip. |
Click a row to open a dialog with the full formatted value (pretty-printed JSON when applicable).
Use Configure table below the grid to show or hide list columns. Column choices are stored in the browser (localStorage).
Value view β
Selecting a key from the Key picker (or from a loaded row) switches to the Cache value table for that entry.
| Control | Description |
|---|---|
| Back to list | Return to the key list. |
| Key | Switch to another key or clear to go back. |
| Configure table | Show or hide value-table columns (persisted in localStorage). |
The value table layout depends on the JSON shape of the stored value:
| Value shape | Table layout |
|---|---|
| Plain string, number, or boolean | Single Value column |
Single JSON object (e.g. { "id": "β¦", "display_name": "β¦" }) | One row; object field names become columns |
| Map of UUID β nested object | One row per UUID; nested object fields become columns |
| Map of UUID β scalar (e.g. timestamp string) | One row per UUID; Entry key and Value columns |
| Mixed scalar and object values in the same map | Raw column with pretty-printed JSON |
| Non-JSON text | Single Value column with the raw string |
Values larger than 16 KiB are truncated for transport. Truncated entries show a warning banner; the preview uses the first 512 characters.
Secret key redaction β
JSON cache values are parsed on the backend before they are sent to the browser. When secret hiding is enabled, matching field names are replaced with ****** in both the string value and structured valueParsed payload.
Redaction is implemented in:
@raclettejs/workbench/plugins/raclette__cache/backend/helpers/cacheEntrySanitizer.ts
Configuration β
| Constant | Default | Purpose |
|---|---|---|
HIDE_SECRETS | true | When true, apply redaction to parsed JSON. Set to false only in trusted local debugging. |
SECRET_KEY_PATTERNS | see below | Case-insensitive regexes matched against JSON object keys (not Valkey key names). |
Redaction runs recursively through nested objects and arrays. Non-JSON values are returned unchanged.
Default key blacklist β
The following patterns are matched against property names inside JSON values:
| Pattern | Matches keys containing (examples) |
|---|---|
/password/i | password, userPassword |
/secret/i | secret, clientSecret |
/token/i | token, idToken |
/api[_-]?key/i | apiKey, api_key |
/credential/i | credential, credentials |
/private[_-]?key/i | privateKey, private_key |
/access[_-]?token/i | accessToken, access_token |
/refresh[_-]?token/i | refreshToken, refresh_token |
/authorization/i | authorization |
/bearer/i | bearer |
Adding or removing patterns β
Edit SECRET_KEY_PATTERNS in cacheEntrySanitizer.ts and redeploy the workbench backend. There is no workbench UI for this list.
Example β redact a custom field name:
export const SECRET_KEY_PATTERNS: RegExp[] = [
// ...existing patterns...
/mySensitiveField/i,
]Use a regex that matches the JSON property name only. Valkey key names are never redacted by this mechanism.
API routes (reference) β
Admin-only read routes used by the widget:
| Route | Purpose |
|---|---|
GET /raclette__cache/cacheEntries | Paginated key list (pattern, offset, limit, db) |
GET /raclette__cache/cacheEntry | Single key lookup (key, db) |
Related β
- Workbench introduction
- Plugins β plugin list and plugin-specific settings (the cache plugin has no separate settings page)