PsrCacheProvider
in package
implements
CredentialProvider
FinalYes
Cache the Credential generated by the decorated CredentialProvider with PSR-6.
The Credential will be reused until it expires.
Tags
Table of Contents
Interfaces
- CredentialProvider
- Interface for providing Credential.
Properties
Methods
- __construct() : mixed
- getCredentials() : Credentials|null
- Return a Credential when possible. Return null otherwise.
- getFromCache() : Credentials|null
Properties
$cache
private
CacheItemPoolInterface
$cache
$decorated
private
CredentialProvider
$decorated
$logger
private
LoggerInterface|null
$logger
Methods
__construct()
public
__construct(CredentialProvider $decorated, CacheItemPoolInterface $cache[, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $decorated : CredentialProvider
- $cache : CacheItemPoolInterface
- $logger : LoggerInterface|null = null
getCredentials()
Return a Credential when possible. Return null otherwise.
public
getCredentials(Configuration $configuration) : Credentials|null
Parameters
- $configuration : Configuration
Return values
Credentials|nullgetFromCache()
private
getFromCache(Configuration $configuration) : Credentials|null
Parameters
- $configuration : Configuration