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
Formatting
For more information about formatting options, see Formatting.
Inherited
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
- csph cache — manage SphereCache caches
- csph cache list — list caches
- csph cache get — show a cache
- csph cache resize — change a cache's size or eviction policy
- csph cache delete — delete a cache
- csph cache instance-types — list cache sizes and prices
- csph cache connection-string — print a cache's connection URI
- csph cache credentials — manage cache credentials