0

Using DaprClient.GetStateAsync, DaprClient.GetStateEntryAsync, and DaprClient.SaveStateAsync with a key value of variablename, whenever I read from/write to Redis, it prefixes the variablename with the name of my application. This is what it looks like in my Redis cache:

appname||variablename

This behavior matches the documentation: https://docs.dapr.io/developing-applications/building-blocks/state-management/query-state-store/query-redis-store/

However, I have a situation where I do not want to have this application name prefix, so that I can write a value from one application and read it from another. Is there a way to do this?

user3338893
  • 917
  • 3
  • 10
  • 17

1 Answers1

0

I'm afraid this is not possible, or discouraged if somehow technically possible. The documentation explains:

Dapr state stores are key/value stores. To ensure data compatibility, Dapr requires these data stores follow a fixed key scheme. For general states, the key format is:

<App ID>||<state key>

See: https://docs.dapr.io/reference/api/state_api/#key-scheme

J.S.
  • 63
  • 1
  • 5