Radiator Server Documentation — v10.33.2

Cache configuration for in-memory data caching and performance optimization

Table of Contents
  • caches
  • Syntax
  • Cache block
  • Example

caches

The caches clause defines one or more named in‑memory caches. Caches allow pipelines (actions, backends, scripts, etc.) to store and reuse values for a limited time, reducing repeated backend lookups and improving overall performance.

Each cache sub-block declares a logical key space where keys map to a collection (vector) of values. Entries can optionally expire automatically if a timeout is configured, or per insertion when values are written.

Only the metadata (cache names and timeouts) is configured here. The actual insertion, lookup, and invalidation operations occur at runtime via pipeline actions (e.g. actions that add or read cached values inside AAA processing), Lua scripts, or management APIs.

Syntax

caches {
    cache "NAME" {
        # Optional default expiration
        timeout 60s;
    }

    cache "SESSIONS" {
        timeout 30m;  # 30 minutes
    }
}

Cache block

A cache block supports:

StatementTypeRequiredDescription
timeoutdurationNoDefault TTL applied to inserted keys if the insertion call does not override it. See Duration Units.

If timeout is omitted, keys inserted without an explicit timeout will persist until explicitly removed or the process restarts.

See Lua cache API documentation for usage examples including rate limiting.

Example

caches {
    cache "USER_ATTRIBUTES" {
        timeout 5m;  # 5 minutes
    }

    cache "SESSION_DATA" {
        timeout 30m;  # 30 minutes
    }

    cache "RATE_LIMIT" {
        timeout 1h;  # 1 hour
    }
}
Navigation
  • @verification

  • aaa

  • backends

  • caches

  • captures

  • certificates

  • clients

  • conditions

  • dictionary

  • hmac-otp

  • include

  • init

  • ip-accept

  • license

  • logging

  • management

  • proxy-protocol

  • scripts

  • servers

  • statistics

  • stats

  • template

  • ui