Skip to content

redis

Tags: Redis

Use a Redis instance as a cache. The expiration can be set to zero or an empty string in order to set no expiration.

YAML Configuration

Common Config

# Common config fields, showing default values
label: ""
redis:
  url: ""
  prefix: ""

Fields

url

The URL of the target Redis server. Database is optional and is supplied as the URL path.

Type: string

# Examples

url: :6397

url: localhost:6397

url: redis://localhost:6379

url: redis://:foopassword@redisplace:6379

url: redis://localhost:6379/1

url: redis://localhost:6379/1,redis://localhost:6380/1

Type: string

Default: ""

# Examples

root_cas: |-
  -----BEGIN CERTIFICATE-----
  ...
  -----END CERTIFICATE-----

Type: string

Default: ""

Type: string

Default: ""

# Examples

password: foo

password: ${KEY_PASSWORD}

**prefix**

An optional string to prefix item keys with in order to prevent collisions with similar services.

Type: string


default_ttl

An optional default TTL to set for items, calculated from the moment the item is cached.

Type: string


retries

Determine time intervals and cut-offs for retry attempts.

Type: object


retries.initial_interval

The initial period to wait between retry attempts.

Type: string

Default: "500ms"

# Examples

initial_interval: 50ms

initial_interval: 1s

retries.max_interval

The maximum period to wait between retry attempts

Type: string

Default: "1s"

# Examples

max_interval: 5s

max_interval: 1m

retries.max_elapsed_time

The maximum overall period of time to spend on retry attempts before the request is aborted.

Type: string

Default: "5s"

# Examples

max_elapsed_time: 1m

max_elapsed_time: 1h