Class: Storage_

Storage_(prefix, optProperties, optCacheopt)

new Storage_(prefix, optProperties, optCacheopt)

Creates a new Storage_ instance, which is used to persist OAuth tokens and related information.
Parameters:
Name Type Attributes Description
prefix string The prefix to use for keys in the properties and cache.
optProperties PropertiesService.Properties The optional properties instance to use.
optCache CacheService.Cache <optional>
The optional cache instance to use.

Methods

getValue(key, optSkipMemoryChecknullable) → {*}

Gets a stored value.
Parameters:
Name Type Attributes Description
key string The key.
optSkipMemoryCheck boolean <nullable>
Whether to bypass the local memory cache when fetching the value (the default is false).
Returns:
The stored value.
Type
*

removeValue(key)

Removes a stored value.
Parameters:
Name Type Description
key string The key.

removeValueWithPrefixedKey_(prefixedKey)

Removes a stored value.
Parameters:
Name Type Description
prefixedKey string The key.

reset(key)

Resets the storage, removing all stored data.
Parameters:
Name Type Description
key string The key.

setValue(key, value)

Stores a value.
Parameters:
Name Type Description
key string The key.
value * The value.