TurboCache
Defined in: plugins/holocron-plugin-turbo/src/capabilities/cache.ts:21
The cache capability for Turbo: checks that Vercel accepts the token and the remote cache answers for the team.
Implements
Section titled “Implements”Cache
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TurboCache(
client,team):TurboCache
Defined in: plugins/holocron-plugin-turbo/src/capabilities/cache.ts:28
client and team are thunks: the token and the team are read when a method runs, not when the plugin loads.
Parameters
Section titled “Parameters”client
Section titled “client”() => object
() => string | undefined
Returns
Section titled “Returns”TurboCache
Properties
Section titled “Properties”
readonlykey:"cache"
Defined in: plugins/holocron-plugin-turbo/src/capabilities/cache.ts:23
The capability key, always cache.
Implementation of
Section titled “Implementation of”Cache.key
providerName
Section titled “providerName”
readonlyproviderName:"turbo"="turbo"
Defined in: plugins/holocron-plugin-turbo/src/capabilities/cache.ts:25
The provider name, turbo.
Implementation of
Section titled “Implementation of”Cache.providerName
Methods
Section titled “Methods”checkToken()
Section titled “checkToken()”checkToken():
Promise<CacheTokenCheck>
Defined in: plugins/holocron-plugin-turbo/src/capabilities/cache.ts:33
Is the token valid for the configured team, and is the remote cache reachable with it? ok: false only for what
the provider answered (a refused token, a team the token cannot reach, a cache that is off); a network failure or
a missing token throws.
Returns
Section titled “Returns”Promise<CacheTokenCheck>
Implementation of
Section titled “Implementation of”Cache.checkToken