Managed Valkey Cache
Quant Cloud provides managed Valkey caches, a high-performance in-memory key/value store for application caching, sessions and queues. Valkey is a 1:1 Redis-compatible drop-in: it speaks the Redis protocol, works with every existing Redis client library and framework integration (phpredis, Predis, ioredis, redis-py, Drupal’s Redis module, Laravel’s Redis driver, and so on), and requires no code changes. If your application already supports Redis, it supports the managed cache.
A cache is an organisation resource. You create it once, under Cloud → Resources or in the Resources section of an application creation wizard, and attach it to any number of environments across your applications. Organisation Caches covers creating, attaching and detaching. This page covers what your application sees and how to connect to it.
Connecting Your Application
Section titled “Connecting Your Application”When an environment deploys with a cache attached, Quant Cloud injects the connection details automatically. Your containers receive:
| Variable | Value |
|---|---|
REDIS_ENABLED |
true |
REDIS_HOST |
The cache endpoint hostname |
REDIS_SERVICE_PORT |
6379 |
REDIS_TLS |
1, so connections must use TLS |
REDIS_USER |
Cache username (injected as a secret) |
REDIS_PASSWORD |
Cache password (injected as a secret) |
CACHE_PREFIX |
A per-environment key prefix (see below) |
If the attachment was given an environment variable prefix, every name above carries it, for example MEDIA_REDIS_HOST.
Configure your Redis client with these values. Note that:
- TLS is required. Most clients accept a
tls://scheme on the host or an explicit TLS/SSL option. - Authentication is required using
REDIS_USERandREDIS_PASSWORD(Redis 6+ ACL-style auth, so pass both, not just a password). - Quant’s Drupal application templates detect
REDIS_ENABLED=trueand configure the Redis module automatically, with no manual settings needed.
The variables are rendered into the environment on its next deploy after the attachment, so redeploy an existing environment once you have attached a cache. An attachment made during application creation is picked up by the initial deployment.
Environments Share One Cache
Section titled “Environments Share One Cache”Every environment attached to a cache connects to the same instance. Isolation comes from CACHE_PREFIX, which is unique per environment, so prefix your keys with it and production and staging never collide. Framework integrations that support a cache or key prefix should use CACHE_PREFIX directly.
Cluster Mode Note
Section titled “Cluster Mode Note”The cache runs in cluster mode. Multi-key operations (MGET, pipelines with multiple keys, RENAME, and so on) require the keys to live in the same hash slot, so wrap your common prefix in braces (a Redis hash tag, for example {myprefix}:item:1) if your application relies on multi-key commands. Most framework cache integrations handle single keys only and need no changes.
Storage Cap and Eviction
Section titled “Storage Cap and Eviction”The storage cap is a hard ceiling, not a pre-allocation. When the cache fills, the least-recently-used evictable entries are removed to make room, so a full cache keeps working and holds your hottest data. Set TTLs (or an evictable policy) on cache entries so they can be reclaimed.
The cap is set when the resource is created and cannot be changed from the dashboard afterwards. If your hit rate drops because the working set outgrows the cap, create a new cache with a larger cap, attach it to the environments, redeploy them, and then detach and delete the old one.
Pricing
Section titled “Pricing”A managed cache is billed at a flat monthly rate per GB of storage cap, regardless of how much of the cap is in use. The cache is billed once for the organisation, and attaching it to more environments or applications costs nothing extra. Deleting the resource stops billing immediately.
Removing a Cache
Section titled “Removing a Cache”Detach the cache from an environment to stop that environment using it. The environment is redeployed without the cache variables, and for Quant’s Drupal templates it falls back to the database cache backend. Detaching leaves the cached data in place.
Delete the resource under Cloud → Resources to remove the cache and its data. You cannot delete a resource that is still attached unless you force the deletion, which detaches and redeploys every environment using it.
Applications with an older per-application cache
Section titled “Applications with an older per-application cache”Some applications still have a cache that was enabled on the application itself, before organisation caches existed. It keeps working, and its Environments page shows it as a read-only Legacy managed cache row. See Organisation Caches for what that means.
