cacheTokens

Configures whether to cache the result of credentials.

When true (default), the result of credentials is cached and reused for subsequent requests. When false, credentials is called on every request, allowing dynamic credential updates without needing to call BasicAuthProvider.clearToken.

Set this to false when:

  • You need to update credentials dynamically during the client's lifetime

  • You manage credential caching externally

  • You want to avoid calling BasicAuthProvider.clearToken on credential changes

Report a problem