A class to implement caching for calls to GCECredentials::onGce. This class
is used automatically when you pass a Psr\Cache\CacheItemPoolInterface
cache object to ApplicationDefaultCredentials::getCredentials.
$sysvCache = new Google\Auth\SysvCacheItemPool();
$creds = Google\Auth\ApplicationDefaultCredentials::getCredentials(
$scope,
null,
null,
$sysvCache
);
CloneableInstantiable
| Constants |
| public Google |
| Methods |
public __construct(?array $cacheConfig = NULL, ?Psr\Cache\CacheItemPoolInterface $cache = NULL)
|
| public onGce(?callable $httpHandler = NULL) Caches the result of onGce so the metadata server is not called multiple times.
|
| Properties |
private $cache = NULL
|
private $cacheConfig = NULL
|
private $maxKeyLength = 64
|
| Methods |
| private getCachedValue( $k) Gets the cached value if it is present in the cache when that is available.
|
private getFullCacheKey( $key)
|
| private setCachedValue( $k, $v) Saves the value in the cache when that is available.
|