Skip to content

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:

ItemDefault
Composition _idcacheList
Pathnamecache-list
WidgetCacheList (pluginKey: raclette__cache)
Interaction linkCache 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 ​

ControlDescription
DBValkey logical database (0–15). Changing DB reloads from the first page.
Key patternOptional SCAN match pattern. Leave empty to list all keys (grouped by key prefix). Examples: billing:*, *session*.
Fetch batchPage size for each request: 25, 50, 100, 200, or 500 (maximum).
KeyAutocomplete to jump directly to a key. Opens the value table for that key.
RefreshReload from offset 0 with the current filters.
Load moreAppend the next page when more keys exist.

Columns ​

ColumnDescription
GroupKey prefix: segment before the first : or ., or (ungrouped) if neither exists. Shown when listing all keys without a pattern.
KeyFull Valkey key.
TTLTime to live: seconds remaining, no expiry, or missing.
ValuePreview 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.

ControlDescription
Back to listReturn to the key list.
KeySwitch to another key or clear to go back.
Configure tableShow or hide value-table columns (persisted in localStorage).

The value table layout depends on the JSON shape of the stored value:

Value shapeTable layout
Plain string, number, or booleanSingle Value column
Single JSON object (e.g. { "id": "…", "display_name": "…" })One row; object field names become columns
Map of UUID β†’ nested objectOne 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 mapRaw column with pretty-printed JSON
Non-JSON textSingle 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 ​

ConstantDefaultPurpose
HIDE_SECRETStrueWhen true, apply redaction to parsed JSON. Set to false only in trusted local debugging.
SECRET_KEY_PATTERNSsee belowCase-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:

PatternMatches keys containing (examples)
/password/ipassword, userPassword
/secret/isecret, clientSecret
/token/itoken, idToken
/api[_-]?key/iapiKey, api_key
/credential/icredential, credentials
/private[_-]?key/iprivateKey, private_key
/access[_-]?token/iaccessToken, access_token
/refresh[_-]?token/irefreshToken, refresh_token
/authorization/iauthorization
/bearer/ibearer

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:

typescript
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:

RoutePurpose
GET /raclette__cache/cacheEntriesPaginated key list (pattern, offset, limit, db)
GET /raclette__cache/cacheEntrySingle key lookup (key, db)