Skip to content

Added documentation for SysVCacheItemPool#995

Merged
tmatsuo merged 3 commits intogoogleapis:masterfrom
tmatsuo:docs-for-989
Apr 6, 2018
Merged

Added documentation for SysVCacheItemPool#995
tmatsuo merged 3 commits intogoogleapis:masterfrom
tmatsuo:docs-for-989

Conversation

@tmatsuo
Copy link
Copy Markdown
Contributor

@tmatsuo tmatsuo commented Apr 5, 2018

@tmatsuo tmatsuo requested a review from dwsupplee April 5, 2018 23:45
@tmatsuo tmatsuo requested a review from jdpedrie as a code owner April 5, 2018 23:45
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 5, 2018
Copy link
Copy Markdown
Contributor

@dwsupplee dwsupplee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These updates look great.

For the bit regarding spanner and sessions, WDYT about a note linking out to here for guiding users on more information on how to use the session pool?

Comment thread README.md Outdated
]);
```

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.

Comment thread Spanner/README.md Outdated

$sessionPool = new CacheSessionPool(
$sessionCache,
['minSession' => 10,

This comment was marked as spam.

Comment thread Spanner/README.md Outdated

## 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.

Comment thread Spanner/README.md Outdated

$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.

Comment thread Spanner/README.md Outdated
);

$database = $client->connect(
$instance,

This comment was marked as spam.

Comment thread Spanner/README.md Outdated
$db,
['sessionPool' => $sessionPool]
);
// `warmup` will actually create the session for the first time.

This comment was marked as spam.

@dwsupplee
Copy link
Copy Markdown
Contributor

Additionally, we could now update this verbiage.

@tmatsuo tmatsuo changed the title Docs for 989 Added documentation for SysVCacheItemPool Apr 6, 2018
@tmatsuo tmatsuo merged commit 9e76550 into googleapis:master Apr 6, 2018
@tmatsuo tmatsuo deleted the docs-for-989 branch April 6, 2018 21:28
@dwsupplee dwsupplee mentioned this pull request Apr 11, 2018
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants