Class: CacheFactory<V>
@ima/core.CacheFactory
Factory for creating instances of CacheEntry.
Type parameters
Name |
---|
V |
Constructors
constructor
• new CacheFactory<V
>()
Type parameters
Name |
---|
V |
Accessors
$dependencies
• Static
get
$dependencies(): Dependencies
Returns
Defined in
packages/core/src/cache/CacheFactory.ts:8
Methods
createCacheEntry
▸ createCacheEntry(value
, ttl
): CacheEntry
<V
>
Create a new instance of CacheEntry with value and ttl.
Parameters
Name | Type | Description |
---|---|---|
value | V | The cache entry value. |
ttl | string | number | Cache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds. |
Returns
CacheEntry
<V
>
The created cache entry.