Skip to content
Browse files

docs: Add note about cached access token (#1696)

* docs: Add note about cached access token

* warn about clear cache
  • Loading branch information...
jdpedrie authored and dwsupplee committed Aug 16, 2019
1 parent 7826dd0 commit 7ea102e2a17a0d173929097f3ebb4663067ba571
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/Google/Client.php
@@ -416,6 +416,17 @@ public function isUsingApplicationDefaultCredentials()
* Set the access token used for requests.
* Note that at the time requests are sent, tokens are cached. A token will be
* cached for each combination of service and authentication scopes. If a
* cache pool is not provided, creating a new instance of the client will
* allow modification of access tokens. If a persistent cache pool is
* provided, in order to change the access token, you must clear the cached
* token by calling `$client->getCache()->clear()`. (Use caution in this case,
* as calling `clear()` will remove all cache items, including any items not
* related to Google API PHP Client.)
* @param string|array $token
* @throws InvalidArgumentException

0 comments on commit 7ea102e

Please sign in to comment.
You can’t perform that action at this time.