Skip to main content
Superwire can cache completed agent executions for repeat requests that use the same client-provided cache key. The executor only reads or writes cache entries when options.cache_key is present and options.use_cache is not false.

Cache drivers

The executor supports two cache drivers: The default cache driver is in-memory.

Run with in-memory cache

Run with Redis cache

Use --cache-driver redis and provide the Redis host. Add --redis-password when your Redis instance requires authentication.
For Redis without a password, omit --redis-password.

Request cache keys

Cache entries are separated by options.cache_key in the /execute request body. Requests with the same cache key can reuse matching agent outputs. Requests with different cache keys do not share entries.
When options.cache_key is omitted or empty, the executor bypasses cache reads and writes for that request.

Rotate or invalidate a cache key

The simplest way to invalidate cached results is to send a new cache key. The playground does this automatically when the page loads, and its purge cache action regenerates the current workflow tab’s cache key. If you need to delete stored entries for a cache key, call POST /cache/invalidate.
The response includes the number of entries removed from the configured cache driver.

Disable caching per request

Set options.use_cache to false to bypass reads and writes for a request.