Skip to content

Conversation

@younes-abouelnagah
Copy link
Contributor

If a cache is set then a token is acquired it is stored in both the Cache service and the Properties service. Therefore, when the Service is reset the token must be removed from the Cache service as well as the Properties service. Otherwise, getAccessToken() would still return the cached token after a call to reset().

If a cache is set then a token is acquired it is stored in both the Cache service and the Properties service. Therefore, when the Service is reset the token must be removed from the Cache service as well as the Properties service. Otherwise, getAccessToken() would still return the cached token after a call to reset().
@oshliaer
Copy link
Contributor

oshliaer commented Oct 10, 2017

It seems after the setting for a Service

.setCache(CacheService.getUserCache() /* a private cache or a public cache */)

The user can't call Service.reset() fully because the cache stores the credits still.

It's true.

@younes-abouelnagah , thanks!

@erickoledadevrel erickoledadevrel merged commit d017eca into googleworkspace:master Oct 11, 2017
@erickoledadevrel
Copy link
Contributor

Good catch, and thanks for the fix!

@younes-abouelnagah younes-abouelnagah deleted the patch-1 branch October 12, 2017 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants