Skip to main content

Class: CacheFactory<V>

Defined in: packages/core/src/cache/CacheFactory.ts:7

Factory for creating instances of CacheEntry.

Type Parameters​

V​

V

Constructors​

Constructor​

new CacheFactory<V>(): CacheFactory<V>

Returns​

CacheFactory<V>

Accessors​

$dependencies​

Get Signature​

get static $dependencies(): Dependencies

Defined in: packages/core/src/cache/CacheFactory.ts:8

Returns​

Dependencies

Methods​

createCacheEntry()​

createCacheEntry(value, ttl): CacheEntry<V>

Defined in: packages/core/src/cache/CacheFactory.ts:21

Create a new instance of CacheEntry with value and ttl.

Parameters​

value​

V

The cache entry value.

ttl​

Cache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds.

string | number

Returns​

CacheEntry<V>

The created cache entry.