Preparing search index...
The search index is not available
Rhidium
Rhidium
DataStructures
PromiseCache
Class PromiseCache<T>
A simple caching mechanism for promises that:
Caches the result of a promise for a specified duration.
Prevents redundant calls by returning the cached promise when available.
Type Parameters
T
Index
Constructors
constructor
Methods
clear
get
Constructors
constructor
new
PromiseCache
<
T
>
(
maxAge
?:
null
|
number
)
:
PromiseCache
<
T
>
Type Parameters
T
Parameters
Optional
maxAge
:
null
|
number
Returns
PromiseCache
<
T
>
Methods
clear
clear
()
:
void
Returns
void
get
get
(
generator
:
PromiseGenerator
<
T
>
)
:
Promise
<
T
>
Parameters
generator
:
PromiseGenerator
<
T
>
Returns
Promise
<
T
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
clear
get
Rhidium
Loading...
A simple caching mechanism for promises that: