Skip to content

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.

  • Cache

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.

() => object

() => string | undefined

TurboCache

readonly key: "cache"

Defined in: plugins/holocron-plugin-turbo/src/capabilities/cache.ts:23

The capability key, always cache.

Cache.key


readonly providerName: "turbo" = "turbo"

Defined in: plugins/holocron-plugin-turbo/src/capabilities/cache.ts:25

The provider name, turbo.

Cache.providerName

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.

Promise<CacheTokenCheck>

Cache.checkToken