Skip to main content

create

create a cache

Create a SphereCache cache (Valkey) in an environment.

Pick a size with --instance-type, by name or id (see csph cache instance-types). Sizes from Cache 3 GB have a high-availability twin (the id ending in -ha): a standby copy in another zone with automatic failover.

--eviction decides what happens when memory is full: allkeys-lru (the default) evicts the least recently used keys; noeviction refuses writes until memory is freed.

Usage​

csph cache create <name> [flags]

Options​

Command Specific​

--engine <string> (default "valkey")

cache engine
--environment <string>
environment ID
--eviction <string>
allkeys-lru (evict the least recently used keys when memory is full) or noeviction (refuse writes instead) (default: allkeys-lru)
--instance-type <string>
size by name or id, e.g. "Cache 1 GB" or sc-0.25c-1g (see csph cache instance-types)
--project <string>
project ID
--version <string>
engine version, e.g. 8.1 (default: the latest)

Formatting​

For more information about formatting options, see Formatting.

-o, --output <string>

output format: [table|plain|csv|json|yaml]

Inherited​

--config <string>
config file (default is $HOME/.config/computesphere/configuration.yaml)
--debug
enable debug logging

-h, --help

show this help message

-i, --interactive

run interactively (prompts, pickers, table browser)
--log-level <string>
log level: [trace|debug|info|warn|error|fatal|panic|disabled||api]
--no-color
disable color output
--no-input
disable interactive mode

Examples​

  csph cache create sessions --instance-type "Cache 1 GB"
csph cache create sessions --instance-type sc-0.25c-1g --eviction noeviction
csph cache create sessions --instance-type "Cache 1 GB" --engine valkey --version 8.1

See also​