#
Class: FileCacheAdaptercore.FileCacheAdapter
#
Implements#
Constructors#
constructor+ new FileCacheAdapter(options
: { cacheDir
: string }, baseDir
: string, pretty?
: boolean): FileCacheAdapter
#
Parameters:Name | Type | Default value |
---|---|---|
options | object | - |
options.cacheDir | string | - |
baseDir | string | - |
pretty | boolean | false |
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:Name | Type |
---|---|
name | string |
Returns: Promise<any>
Implementation of: CacheAdapter
Defined in: packages/core/src/cache/FileCacheAdapter.ts:18
#
getHashâ–¸ Private
getHash(origin
: string): Promise<null | string>
#
Parameters:Name | Type |
---|---|
origin | string |
Returns: Promise<null | string>
Defined in: packages/core/src/cache/FileCacheAdapter.ts:62
#
pathâ–¸ Private
path(name
: string): Promise<string>
#
Parameters:Name | Type |
---|---|
name | string |
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:Name | Type |
---|---|
name | string |
data | any |
origin | string |
Returns: Promise<void>
Implementation of: CacheAdapter
Defined in: packages/core/src/cache/FileCacheAdapter.ts:38