turbodombuilder - v0.9.5
Preparing search index...
cache
Function cache
cache
(
options
?:
CacheOptions
,
)
:
<
Type
extends
object
,
Value
>
(
value
:
|
{
get
?:
(
this
:
Type
)
=>
Value
;
set
?:
(
this
:
Type
,
value
:
Value
)
=>
void
;
}
|
(
(
this
:
Type
,
...
args
:
any
[]
)
=>
any
)
|
(
(
this
:
Type
)
=>
Value
)
,
context
:
|
ClassMethodDecoratorContext
<
Type
,
(
this
:
Type
,
...
args
:
any
)
=>
any
>
|
ClassGetterDecoratorContext
<
Type
,
Value
>
|
ClassAccessorDecoratorContext
<
Type
,
Value
>
,
)
=>
any
Parameters
Optional
options
:
CacheOptions
= {}
Optional caching options.
Returns
<
Type
extends
object
,
Value
>
(
value
:
|
{
get
?:
(
this
:
Type
)
=>
Value
;
set
?:
(
this
:
Type
,
value
:
Value
)
=>
void
;
}
|
(
(
this
:
Type
,
...
args
:
any
[]
)
=>
any
)
|
(
(
this
:
Type
)
=>
Value
)
,
context
:
|
ClassMethodDecoratorContext
<
Type
,
(
this
:
Type
,
...
args
:
any
)
=>
any
>
|
ClassGetterDecoratorContext
<
Type
,
Value
>
|
ClassAccessorDecoratorContext
<
Type
,
Value
>
,
)
=>
any
Description
Stage-3 cache decorator:
When used on a method, it will cache the return value per arguments.
When used on a getter, it will cache its value once per instance.
When used on an accessor, it will wrap the getter similar to a cached getter.
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
turbodombuilder - v0.9.5
Loading...
Optional caching options.