Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit d804872

Browse files
author
Eric Koleda
authored
Merge pull request #46 from labnol/patch-1
Use Cache for credentials
2 parents 45297bd + f2062e6 commit d804872

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

samples/Twitter.gs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ function getService() {
4949
// Set the name of the callback function in the script referenced
5050
// above that should be invoked to complete the OAuth flow.
5151
.setCallbackFunction('authCallback')
52+
53+
// Using a cache will reduce the need to read from
54+
// the property store and may increase performance.
55+
.setCache(CacheService.getUserCache())
5256

5357
// Set the property store where authorized tokens should be persisted.
5458
.setPropertyStore(PropertiesService.getUserProperties());

0 commit comments

Comments
 (0)