Class: CacheTokenStore<IsAsync>
Defined in: schemas/v2/cache/token.ts:10
Extends
CacheStoreShared<IsAsync,Oauth2StoredToken>
Type Parameters
| Type Parameter |
|---|
IsAsync extends boolean |
Constructors
Constructor
new CacheTokenStore<
IsAsync>(async,binding?,options?):CacheTokenStore<IsAsync>
Defined in: schemas/v2/cache/token.ts:11
Parameters
| Parameter | Type |
|---|---|
async | IsAsync |
binding? | CacheStoreBinding<IsAsync, Oauth2StoredToken> |
options? | CacheStoreSharedOptions<{ key: string; }> |
Returns
CacheTokenStore<IsAsync>
Overrides
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
binding | public | CacheStoreBinding<IsAsync, Oauth2StoredToken> | The binding used for persistent storage of cache values. Defaults to storing the values in the process memory. | CacheStoreShared.binding |
options | public | Required<CacheStoreSharedOptions<C>> | Options for the cache. Can be used to control how the cache behaves on edits or other options for custom cache items. | CacheStoreShared.options |
Methods
bulkDelete()
bulkDelete(
keys):If<IsAsync,Promise<void>>
Defined in: schemas/v2/cache/shared.ts:203
Deletes the values for multiple items. If the binding has not configured a bulkDelete handler, the delete handler will be used for all items.
Parameters
| Parameter | Type | Description |
|---|---|---|
keys | { key: string; }[] | List of identifiers. Use the converter options for handling custom values. |
Returns
If<IsAsync, Promise<void>>
Inherited from
bulkGet()
bulkGet(
keys):If<IsAsync,Promise<({key:string;value:Oauth2StoredToken; } |undefined)[]>>
Defined in: schemas/v2/cache/shared.ts:177
Gets the values for multiple items. If the binding has not configured a bulkGet handler, the get handler will be used for all items.
Parameters
| Parameter | Type | Description |
|---|---|---|
keys | { key: string; }[] | List of identifiers. Use the converter options for handling custom values. |
Returns
If<IsAsync, Promise<({ key: string; value: Oauth2StoredToken; } | undefined)[]>>
Inherited from
bulkPut()
bulkPut(
items):If<IsAsync,Promise<void>>
Defined in: schemas/v2/cache/shared.ts:152
Sets the values for multiple items. If the binding has not configured a bulkPut handler, the put handler will be used for all items.
Parameters
| Parameter | Type | Description |
|---|---|---|
items | ({ key: string; } & { value: Oauth2StoredToken; })[] | List of identifiers with the values. Use the converter options for handling custom values. |
Returns
If<IsAsync, Promise<void>>
Inherited from
delete()
delete(...
args):If<IsAsync,Promise<void>>
Defined in: schemas/v2/cache/shared.ts:95
Delete a value.
Parameters
| Parameter | Type | Description |
|---|---|---|
...args | [string] | The identifier of the value. Use the converter options for handling custom values. |
Returns
If<IsAsync, Promise<void>>
Inherited from
deleteAll()
deleteAll():
If<IsAsync,Promise<void>>
Defined in: schemas/v2/cache/shared.ts:84
Deletes all values if the binding has defined a deleteAll handler.
Returns
If<IsAsync, Promise<void>>
Inherited from
edit()
edit(...
args):If<IsAsync,Promise<Oauth2StoredToken|undefined>,Oauth2StoredToken|undefined>
Defined in: schemas/v2/cache/shared.ts:128
Edits a value. Uses the options.patchUnknownItem to control how unknown values are edited.
Parameters
| Parameter | Type | Description |
|---|---|---|
...args | [string, value: Partial<Oauth2StoredToken> | ((item) => Oauth2StoredToken)] | The identifier of the value with the new (partial) item. Use the converter options for handling custom values. |
Returns
If<IsAsync, Promise<Oauth2StoredToken | undefined>, Oauth2StoredToken | undefined>
Inherited from
get()
get(...
args):If<IsAsync,Promise<Oauth2StoredToken|undefined>>
Defined in: schemas/v2/cache/shared.ts:118
Gets a value.
Parameters
| Parameter | Type | Description |
|---|---|---|
...args | [string] | The identifier of the value. Use the converter options for handling custom values. |
Returns
If<IsAsync, Promise<Oauth2StoredToken | undefined>>
Inherited from
isAsync()
isAsync():
boolean
Defined in: schemas/v2/cache/shared.ts:76
Returns
boolean
whether this cache is using an async binding.
Inherited from
put()
put(...
args):If<IsAsync,Promise<void>>
Defined in: schemas/v2/cache/shared.ts:105
Sets a value.
Parameters
| Parameter | Type | Description |
|---|---|---|
...args | [string, value: Oauth2StoredToken] | The identifier with the value. Use the converter options for handling custom values. |
Returns
If<IsAsync, Promise<void>>
Inherited from
createAsync()
staticcreateAsync<Value,Store>(store,binding?,options?):InstanceType<Store>
Defined in: schemas/v2/cache/shared.ts:226
Type Parameters
| Type Parameter |
|---|
Value |
Store extends typeof CacheStoreShared |
Parameters
| Parameter | Type |
|---|---|
store | Store |
binding? | CacheStoreBinding<true, Value> |
options? | Partial<Store["prototype"]["options"]> |
Returns
InstanceType<Store>
Inherited from
createSync()
staticcreateSync<Value,Store>(store,binding?,options?):InstanceType<Store>
Defined in: schemas/v2/cache/shared.ts:218
Type Parameters
| Type Parameter |
|---|
Value |
Store extends typeof CacheStoreShared |
Parameters
| Parameter | Type |
|---|---|
store | Store |
binding? | CacheStoreBinding<false, Value> |
options? | Partial<Store["prototype"]["options"]> |
Returns
InstanceType<Store>