Skip to main content

Memcached

Type: state.memcached

Status: stable

Reference: https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-memcached/

Example

apiVersion: cra.diagrid.io/v1beta1
kind: Component
metadata:
name: <name>
spec:
type: state.memcached
version: v1
metadata:
# Comma-delimited list of endpoints
- name: hosts
value: "memcached.default.svc.cluster.local:11211"
# Prefix added to keys in the state store. (Optional)
#- name: keyPrefix
# value: "appid"
# Max number of idle connections. (Optional)
#- name: maxIdleConnections
# value: "2"
# Timeout for calls to the service. (Optional)
#- name: timeout
# value: "1s"

Metadata

hosts (string)

Required - Comma-delimited list of endpoints

Example value: memcached.default.svc.cluster.local:11211

keyPrefix (string)

Prefix added to keys in the state store.

Default value: appid

Example value: appid

Allowed values:

  • appid

  • name

  • none

Documentation: https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-share-state/

maxIdleConnections (number)

Max number of idle connections.

Default value: 2

Example value: 3

timeout (duration)

Timeout for calls to the service.

Default value: 1s

Example value: 5s