Added documentation for SysVCacheItemPool#995
Merged
tmatsuo merged 3 commits intogoogleapis:masterfrom Apr 6, 2018
Merged
Conversation
dwsupplee
reviewed
Apr 6, 2018
| ]); | ||
| ``` | ||
|
|
||
| The [Google Auth library](https://github.com/google/google-auth-library-php) provides a PSR-6 implementation with the SystemV shared memory. This implementation is only available on *nix machines, but it's the one of the fastest implementations and you can share the cache among multiple processes. The following example shows how to use it. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| $sessionPool = new CacheSessionPool( | ||
| $sessionCache, | ||
| ['minSession' => 10, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| ## Session warmup | ||
|
|
||
| To issue a query against the Spanner service, the client library needs to request a session id to the server under the cover. This API call will add significant latency to your program. The Spanner client library provides a handy way to alleviate this problem by having a cached session pool. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| $authCache = new SysVCacheItemPool(); | ||
| $sessionCache = new SysVCacheItemPool([ | ||
| 'proj' => 'B' // Use different from the default |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| ); | ||
|
|
||
| $database = $client->connect( | ||
| $instance, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| $db, | ||
| ['sessionPool' => $sessionPool] | ||
| ); | ||
| // `warmup` will actually create the session for the first time. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Contributor
|
Additionally, we could now update this verbiage. |
dwsupplee
approved these changes
Apr 6, 2018
Merged
gcf-owl-bot Bot
added a commit
that referenced
this pull request
Mar 18, 2025
Source-Link: googleapis/googleapis@4c4d2b6 Source-Link: googleapis/googleapis-gen@f3cb791 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiZjNjYjc5MTBmMzgwYWY2M2MyNTc3NzgzODg5Y2RhYjBlN2Q0ZmFiOSJ9
Hectorhammett
pushed a commit
that referenced
this pull request
Mar 20, 2025
…#8168) * feat: Update Compute Engine API to revision 20250302 (#995) Source-Link: googleapis/googleapis@4c4d2b6 Source-Link: googleapis/googleapis-gen@f3cb791 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiZjNjYjc5MTBmMzgwYWY2M2MyNTc3NzgzODg5Y2RhYjBlN2Q0ZmFiOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #989
Preview available on:
https://github.com/tmatsuo/google-cloud-php/tree/docs-for-989
https://github.com/tmatsuo/google-cloud-php/tree/docs-for-989/Spanner
https://github.com/tmatsuo/google-cloud-php/blob/docs-for-989/Spanner/src/Session/CacheSessionPool.php