Preparing search index...
The search index is not available
thingies
thingies
Cache
Class Cache<T>
Type Parameters
T
Index
Constructors
constructor
Properties
entries
eviction
Time
gc
Period
map
max
Entries
method
timer
ttl
Methods
exists
get
get
From
Source
get
Sync
put
remove
retire
runGC
scheduleGC
startGC
stopGC
Constructors
constructor
new
Cache
<
T
>
(
method
?
)
:
Cache
<
T
>
Type Parameters
T
Parameters
method
:
(
(
key
)
=>
Promise
<
T
>
)
= ...
(
key
)
:
Promise
<
T
>
Parameters
key
:
string
Returns
Promise
<
T
>
Returns
Cache
<
T
>
Properties
Private
entries
entries
:
number
= 0
eviction
Time
eviction
Time
:
number
= 20000
gc
Period
gc
Period
:
number
= 30000
map
map
:
Map
<
string
,
CacheEntry
<
T
>
>
= ...
max
Entries
max
Entries
:
number
= 100000
method
method
:
(
(
key
)
=>
Promise
<
T
>
)
= ...
Type declaration
(
key
)
:
Promise
<
T
>
Parameters
key
:
string
Returns
Promise
<
T
>
Private
timer
timer
:
any
ttl
ttl
:
number
= 10000
Methods
exists
exists
(
key
)
:
boolean
Parameters
key
:
string
Returns
boolean
get
get
(
key
)
:
Promise
<
T
>
Parameters
key
:
string
Returns
Promise
<
T
>
get
From
Source
get
From
Source
(
key
)
:
Promise
<
T
>
Parameters
key
:
string
Returns
Promise
<
T
>
get
Sync
get
Sync
(
key
)
:
null
|
T
Parameters
key
:
string
Returns
null
|
T
put
put
(
key
,
value
)
:
void
Parameters
key
:
string
value
:
T
Returns
void
remove
remove
(
key
)
:
boolean
Parameters
key
:
string
Returns
boolean
retire
retire
(
key
,
newTime
?
)
:
boolean
Parameters
key
:
string
newTime
:
number
= 0
Returns
boolean
runGC
runGC
(
)
:
void
Returns
void
scheduleGC
scheduleGC
(
)
:
void
Returns
void
startGC
startGC
(
)
:
void
Returns
void
stopGC
stopGC
(
)
:
void
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
entries
eviction
Time
gc
Period
map
max
Entries
method
timer
ttl
exists
get
get
From
Source
get
Sync
put
remove
retire
runGC
scheduleGC
startGC
stopGC
thingies
Loading...