SymfonyCacheProvider
in package
implements
CredentialProvider
FinalYes
Cache the Credential generated by the decorated CredentialProvider with Symfony Cache.
Symfony Cache provides stampede protection which is preferred on applications with more than 1 or 2 requests per second.
The Credential will be reused until it expires.
Tags
Table of Contents
Interfaces
- CredentialProvider
- Interface for providing Credential.
Properties
- $cache : CacheInterface
- $decorated : CredentialProvider
- $logger : LoggerInterface|null
Methods
- __construct() : mixed
- getCredentials() : Credentials|null
- Return a Credential when possible. Return null otherwise.
Properties
$cache
private
CacheInterface
$cache
$decorated
private
CredentialProvider
$decorated
$logger
private
LoggerInterface|null
$logger
Methods
__construct()
public
__construct(CredentialProvider $decorated, CacheInterface $cache[, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $decorated : CredentialProvider
- $cache : CacheInterface
- $logger : LoggerInterface|null = null
getCredentials()
Return a Credential when possible. Return null otherwise.
public
getCredentials(Configuration $configuration) : Credentials|null
Parameters
- $configuration : Configuration