CacheProvider
in package
implements
CredentialProvider, ResetInterface
FinalYes
Cache the Credential generated by the decorated CredentialProvider in memory.
The Credential will be reused until it expires.
Tags
Table of Contents
Interfaces
- CredentialProvider
- Interface for providing Credential.
- ResetInterface
- Provides a way to reset an object to its initial state.
Properties
- $cache : array<string, Credentials|null>
- $decorated : CredentialProvider
Methods
- __construct() : mixed
- getCredentials() : Credentials|null
- Return a Credential when possible. Return null otherwise.
- reset() : void
Properties
$cache
private
array<string, Credentials|null>
$cache
= []
$decorated
private
CredentialProvider
$decorated
Methods
__construct()
public
__construct(CredentialProvider $decorated) : mixed
Parameters
- $decorated : CredentialProvider
getCredentials()
Return a Credential when possible. Return null otherwise.
public
getCredentials(Configuration $configuration) : Credentials|null
Parameters
- $configuration : Configuration
Return values
Credentials|nullreset()
public
reset() : void