Gateway Caching
Important:For ongoing Gateway configuration changes, always use the Gateway Configuration Manager, Akeyless CLI, or Helm values (for Kubernetes) to manage settings for the entire Gateway cluster.
Never configure only a single Gateway instance in a cluster. All instances in a cluster must be managed together using the supported tools above. Configuring only one instance, or making changes to individual containers or pods, will result in configuration drift, inconsistent behavior, and potential security or availability risks.
Avoid per-instance container startup command changes for routine updates. These should only be used for initial bootstrap or emergency recovery, not for ongoing management.
Use this section to choose the right Gateway caching method for your environment.
Cache Types
Gateway caching has four practical patterns to choose from:
| Type | Best for | Avoid when |
|---|---|---|
| Runtime Caching | Standard request acceleration and reduced repeated SaaS fetches | You need all reads to always bypass cache |
| Proactive Caching | Pre-warming and refresh jobs to reduce first-read latency | Your environment is rate-limit constrained |
| Cluster Cache (Standalone) | Shared Redis cache for multi-pod Gateway with low operational overhead | You require cache failover across Redis node or pod failures |
| Cluster Cache High Availability (HA) | Sentinel-based high-availability cache service for resilient shared cache | You prefer the simplest deployment footprint and can accept standalone Redis risk |
Choosing a Caching Method
Use this starting decision flow:
- Start with runtime caching for most environments.
- Add proactive caching when you need faster first-read performance for frequently used secrets.
- Add standalone cluster cache when running multiple Gateway pods that should share cache state.
- Use Cluster Cache High Availability (HA) when shared cache availability across failures is a requirement.
For planning guidance and tradeoffs, see Gateway Best Practices: Caching strategy considerations.
For Kubernetes proactive cache sizing guidance, see Gateway Best Practices: Resource planning for Kubernetes proactive cache.
Configure in Gateway UI
To manage cache runtime settings from Gateway Configuration Manager:
- Open
https://<your-gateway-url>:8000/console. - Go to Gateways, then Your Gateway, then Manage Gateway, then Caching Configuration.
- Configure cache and proactive cache options.
- Save changes.
For Kubernetes deployment keys (globalConfig.clusterCache, cacheHA, and persistence options), see Helm Values Reference.
Use the Akeyless CLI to update cache runtime settings, for example:
akeyless gateway update cache \
--enable-cache true \
--enable-proactive true \
--stale-timeout 60 \
--minimum-fetch-interval 5 \
--gateway-url 'https://<Your-Akeyless-GW-URL>:8000'ignore-cache Behavior
The ignore-cache flag is intended to bypass cache and fetch directly from SaaS.
akeyless get-secret-value --name /mysecret --ignore-cache trueIn disconnected mode (when SaaS is unreachable), runtime still checks cache first even when ignore-cache=true. If the value is not cached, the request fails.
Updated 6 days ago
