Skip to main content
Version: 4.5

Class: FileCacheAdapter#

core.FileCacheAdapter

Implements#

Constructors#

constructor#

+ new FileCacheAdapter(options: { cacheDir: string }, baseDir: string, pretty?: boolean): FileCacheAdapter

Parameters:#

NameTypeDefault value
optionsobject-
options.cacheDirstring-
baseDirstring-
prettybooleanfalse

Returns: FileCacheAdapter

Defined in: packages/core/src/cache/FileCacheAdapter.ts:9

Properties#

VERSION#

Private Readonly VERSION: string

Defined in: packages/core/src/cache/FileCacheAdapter.ts:9

Methods#

clear#

clear(): Promise<void>

Clears all items stored in the cache.

Returns: Promise<void>

Implementation of: CacheAdapter

Defined in: packages/core/src/cache/FileCacheAdapter.ts:51


get#

get(name: string): Promise<any>

Gets the items under name key from the cache.

Parameters:#

NameType
namestring

Returns: Promise<any>

Implementation of: CacheAdapter

Defined in: packages/core/src/cache/FileCacheAdapter.ts:18


getHash#

PrivategetHash(origin: string): Promise<null | string>

Parameters:#

NameType
originstring

Returns: Promise<null | string>

Defined in: packages/core/src/cache/FileCacheAdapter.ts:62


path#

Privatepath(name: string): Promise<string>

Parameters:#

NameType
namestring

Returns: Promise<string>

Defined in: packages/core/src/cache/FileCacheAdapter.ts:57


set#

set(name: string, data: any, origin: string): Promise<void>

Sets the item to the cache. origin is used for cache invalidation and should reflect the change in data.

Parameters:#

NameType
namestring
dataany
originstring

Returns: Promise<void>

Implementation of: CacheAdapter

Defined in: packages/core/src/cache/FileCacheAdapter.ts:38

Last updated on by Renovate Bot