Per #225, filing an additional ticket for this feature request. Thanks again!
Is your feature request related to a problem? Please describe.
The SysVCacheItemPool class points out that calling code should handle race conditions, but the FetchAuthTokenCache class, which is used by the google-cloud-php library when the authCache parameter is passed in (see here), does not do any locking.
This means that users that follow code examples such as the following (from here):
$authCache = new SysVCacheItemPool();
$sessionCache = new SysVCacheItemPool([
// Use a different project identifier for ftok than the default
'proj' => 'B'
]);
$spanner = new SpannerClient([
'authCache' => $authCache
]);
...may run into race condition issues unknowingly.
Describe the solution you'd like
Either of the two:
FetchAuthTokenCache adds a locking mechanism to safely use the passed inCacheItemPoolInterface
- I file an issue in the google-cloud-php repository to request it use a cache with locking built in.
Per #225, filing an additional ticket for this feature request. Thanks again!
Is your feature request related to a problem? Please describe.
The SysVCacheItemPool class points out that calling code should handle race conditions, but the FetchAuthTokenCache class, which is used by the
google-cloud-phplibrary when theauthCacheparameter is passed in (see here), does not do any locking.This means that users that follow code examples such as the following (from here):
...may run into race condition issues unknowingly.
Describe the solution you'd like
Either of the two:
FetchAuthTokenCacheadds a locking mechanism to safely use the passed inCacheItemPoolInterface