dcloud deploy cache bindBind a managed Valkey cache (its private address, in the app’s VPC)
Generates {prefix}REDIS_URL and {prefix}VALKEY_URL (redis://default:<password>@<private address>:6379) at every rollout. Refused unless every machine of the app is in the cache’s VPC. Saving does not restart the app. Pass redeploy: true to roll the live deployment’s own source onto the new configuration (also needs deploy:DeployApp); otherwise the response and GET …/env report pending until someone redeploys.
Synopsis
dcloud deploy cache bind id --cache-cluster-id cacheClusterId [flags]Arguments
<id>Requiredstring
Also accepted as
--id. Constraints: uuid
Flags
--cache-cluster-idRequiredstring
The managed Valkey cache to bind
Constraints: /^ewc-[0-9a-f]{12}$/
--env-prefixOptionalstring
Put in front of every generated variable name (e.g. CACHE_ gives CACHE_REDIS_URL), so one app can hold several bindings of a kind; default empty
Constraints: max 32 chars, /^([A-Z][A-Z0-9_]*_)?$/
--redeployOptionalboolean (--redeploy / --no-redeploy)
Also roll the live deployment onto the new configuration; default false
Example
dcloud deploy cache bind id --cache-cluster-id exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.