Skip to content

Caches

SKE provisions managed cache instances in your cloud account. On AWS, caches run on ElastiCache. On GCP, they run on Memorystore.

Terminal window
ske cache:create \
--name my-cache \
--engine redis \
--tier small \
--network my-network
✓ Cache creation started (job #16)
⠋ Provisioning...

A cache must be attached to a network — create the network first (see Networks).

Engine AWS (ElastiCache) GCP (Memorystore)
redis Redis 7.x Redis 7.x
valkey Valkey 7.x
memcached Memcached

Valkey is AWS-only. Memcached is GCP-only. Redis is available on both providers.

Tier Description Use case
micro Minimal memory Development
small 1.5 GB Staging
medium 6 GB Small production
large 13 GB Production
xlarge 26 GB Large production

For variable workloads, use serverless mode (AWS only):

Terminal window
ske cache:create \
--name my-cache \
--engine redis \
--serverless \
--min-ecpu 1000 \
--max-ecpu 100000 \
--network my-network

Serverless ElastiCache scales compute and memory automatically based on demand.

Option Description Default
--engine Cache engine redis
--tier Instance size small
--serverless Enable serverless scaling (AWS) false
--min-ecpu Minimum eCPUs (serverless) 1000
--max-ecpu Maximum eCPUs (serverless) 100000
--snapshot-retention Snapshot retention in days 0
--multi-az Enable multi-AZ deployment false

When you attach a cache to an environment, SKE sets:

CACHE_HOST=my-cache.abc123.cache.amazonaws.com
CACHE_PORT=6379

Your Laravel config/cache.php and config/database.php pick these up through the REDIS_HOST / CACHE_HOST environment variables.

Caches are provisioned inside the VPC of the associated network. They are reachable from your application but not from the public internet. This is by design — caches should never be publicly accessible.

Terminal window
# List caches
ske cache:list
# Show cache details
ske cache:show my-cache
# Delete a cache
ske cache:delete my-cache