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.

Caches are created in the dashboard: go to Infrastructure, Caches and select Create cache. Provisioning runs as a tracked job; follow it on the cache’s page or with ske job list. Sync from AWS brings in a cache that already exists in your AWS account.

A cache must be attached to a network — create the network first (see Networks). Only active networks can be picked.

Engine AWS (ElastiCache) GCP (Memorystore)
redis AWS’s default Redis version Redis 7.2
valkey AWS’s default Valkey version —

Redis is available on both providers. On AWS, Redis and Valkey caches run either node-based or serverless. On GCP, caches run on Memorystore for Redis, so Valkey is AWS-only.

For variable workloads, turn on Serverless mode (AWS only) and set the minimum and maximum ECPU. Serverless ElastiCache scales compute and memory automatically based on demand.

Field Description Default
Name Lowercase letters, numbers and hyphens Required
Network The network the cache runs in Required
Engine Redis, or Valkey on AWS Redis
Node type The node size: an ElastiCache node type, or a Memorystore size in GB The provider’s default
Min ECPU, Max ECPU ECPU range in serverless mode (1,000 to 100,000) 1000 to 10000
Snapshot retention (days) 0 to 35 0
Multi-AZ Cross-availability-zone replication (regional high availability on GCP) Off

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

REDIS_HOST=tls://my-cache.abc123.cache.amazonaws.com
REDIS_PORT=6379
REDIS_PREFIX=<environment prefix>:database:
CACHE_STORE=redis

REDIS_HOST starts with tls:// when the cache uses TLS. Laravel’s config/database.php picks these up for its Redis connection, and the cache becomes Laravel’s cache store, shared by every instance. On a serverless cache SKE also sets REDIS_CACHE_DB=0, as a serverless cache has only database 0; a node-based cache keeps Laravel’s default, database 1. CACHE_PREFIX keeps each environment’s keys apart. Sessions don’t move to the cache: see Environment variables. A secret of the same name overrides any of these.

php artisan cache:clear empties the whole Redis database the cache store is on, for every environment attached to the cache. On a serverless cache that is the only database, so it also clears locks and anything else the app keeps in Redis. If one environment clearing its cache must not touch another, give each environment its own cache.

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.

The Caches page lists the workspace’s caches. Open one to see its details, edit it or delete it.