Configure the Gateway Cache

The Akeyless Restful API can use the Gateway cache to improve performance when fetching common secrets. Additionally, the Proactive Cache enables storing secrets in your cache for use when communications are limited with the Akeyless cloud (a power cycle, network outage, the internet is down or the Gateway is restarting for example).

When the cache is enabled, every call for get-secret-value uses the cache as follows:

  • If the secret is in the cache, the secret is returned and the secret value is updated if necessary
  • If the secret is not in the cache, it's fetched from Akeyless and its value is saved to the cache
  • When Proactive Caching is enabled, multiple secrets are fetched based on the requestor's access policy, ensuring service continuity



  1. A maximum of 50,000 secrets can be stored in the cache at once.
  2. If no secrets have been fetched since the last expiration of the “Stale Timeout” period, secrets will be unavailable in the cache.
  3. When using Proactive Caching and there is no internet connection, the cache won’t delete old items until an internet connection is returned.

From the Akeyless Gateway, you can:

Configure the Cache

  1. From the Akeyless Gateway Configuration Manager go to the Cache tab.
  2. Check the Enable Cache checkbox
  1. Set the Stale Timeout - this is the amount of time during which a secret should be cached (in minutes). The secret expires and is deleted from the cache at the end of this duration; when deleted, the Akeyless Restful API will request the asset again
  2. Set the Minimum Fetching Interval - this is the minimum fetching interval used to avoid fetching a secret too many times in a given timeframe (in minutes); the secret is only updated when the Minimum Fetching Interval expires.
  3. Click Save Changes.

Configure Akeyless Restful API Proactive Cache

  1. From the Akeyless Gateway Configuration Manager go to the Cache tab.
  2. Check the Enable Proactive Caching checkbox.
  1. Set the Secure Backup Interval property - this is the amount of time between each backup (in minutes).
  2. Click Save Changes.

Did this page help you?