In-memory

Detailed documentation on the in-memory state component

The in-memory state store component maintains state in the Dapr sidecar’s memory. This is primarily meant for development purposes. State is not replicated across multiple sidecars and is lost when the Dapr sidecar is restarted.

Component format

To setup in-memory state store, create a component of type state.in-memory. See this guide on how to create and apply a state store configuration.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. spec:
  6. type: state.in-memory
  7. version: v1
  8. metadata:
  9. # Uncomment this if you wish to use In-memory as a state store for actors (optional)
  10. #- name: actorStateStore
  11. # value: "true"

Note: While in-memory does not require any specific metadata for the component to work, spec.metadata is a required field.

Last modified October 11, 2024: Fixed typo (#4389) (fe17926)