Cache Expiration Control
Credential cache relies on a Time-to-Live (TTL), which is 10 minutes by default. Once the TTL expires, the next request for the same secret will always fetch the updated value from Secret Server. If a secret is rotated within the TTL window (i.e., within 10 minutes), the cache returning the old value is expected behavior. Cache stores any secret that is requested via the API. It is not limited to MID Server credentials.
You can configure how long secrets remain cached before expiring by modifying the cache expiration setting.
Configuration Location
The cache expiration setting is located in the appsettings.json file in your Credentials Cache installation directory on the Distributed Engine.
File Path:
- For Windows: Navigate to
[Distributed-Engine-Root]\wwwroot\[DelineaCredentialCache-folder]\appsettings.json - For Linux: Navigate to
[credcache-installation-directory]/appsettings.json
Setting Details
Parameter:CredentialCacheExpirationMinutes
Default Value: 10 minutes
Description: This setting determines how long a cached secret remains valid before expiring and being automatically removed from the cache.
To modify the cache expiration:
- Open the
appsettings.jsonfile in a text editor. - Locate the
CredentialCacheExpirationMinutesparameter. -
Set the value to your desired expiration time (in minutes).
- Example: Set to
15for 15 minutes,20for 20 minutes, etc.
- Example: Set to
- Save the file.
- Restart the Credentials Cache service for changes to take effect.
Example Configuration:
{
"CredentialCacheExpirationMinutes": 10,
"LogPath": "C:\\DCC\\Logs",
"EnableLogging": true
}
Additional Settings:
The appsettings.json file also contains the following settings:
- LogPath: Specifies the directory where log files are stored
- EnableLogging: Set to
trueto enable logging orfalseto disable log writing