@wxn0brp/ac
Preparing search index...
AnotherCache
Class AnotherCache<V, K>
Type Parameters
V
=
any
K
=
string
Index
Constructors
constructor
Properties
_
cleanup
Interval?
_
cleanup
Loop
Id?
_
max
Size?
_
store
_
ttl
Methods
_
cleanup
_
cleanup
Loop
clear
delete
get
get
Or
Fetch
has
keys
set
size
Constructors
constructor
new
AnotherCache
<
V
=
any
,
K
=
string
>
(
options
?:
AnotherCacheOptions
,
)
:
AnotherCache
<
V
,
K
>
Type Parameters
V
=
any
K
=
string
Parameters
Optional
options
:
AnotherCacheOptions
Returns
AnotherCache
<
V
,
K
>
Properties
Optional
_
cleanup
Interval
_cleanupInterval
?:
number
Optional
_
cleanup
Loop
Id
_cleanupLoopId
?:
number
Optional
_
max
Size
_maxSize
?:
number
_
store
_store
:
Map
<
K
,
CacheEntry
<
V
>
>
= ...
_
ttl
_ttl
:
number
Methods
_
cleanup
_cleanup
()
:
void
Returns
void
_
cleanup
Loop
_cleanupLoop
()
:
void
Returns
void
clear
clear
()
:
void
Returns
void
delete
delete
(
key
:
K
)
:
boolean
Parameters
key
:
K
Returns
boolean
get
get
(
key
:
K
)
:
V
Parameters
key
:
K
Returns
V
get
Or
Fetch
getOrFetch
(
key
:
K
,
fetcher
:
()
=>
Promise
<
V
>
,
ttl
?:
number
)
:
Promise
<
V
>
Parameters
key
:
K
fetcher
:
()
=>
Promise
<
V
>
Optional
ttl
:
number
Returns
Promise
<
V
>
getOrFetch
(
key
:
K
,
fetcher
:
()
=>
V
,
ttl
?:
number
)
:
V
Parameters
key
:
K
fetcher
:
()
=>
V
Optional
ttl
:
number
Returns
V
has
has
(
key
:
K
)
:
boolean
Parameters
key
:
K
Returns
boolean
keys
keys
()
:
K
[]
Returns
K
[]
set
set
(
key
:
K
,
value
:
V
,
ttl
?:
number
)
:
void
Parameters
key
:
K
value
:
V
Optional
ttl
:
number
Returns
void
size
size
()
:
number
Returns
number
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
_
cleanup
Interval
_
cleanup
Loop
Id
_
max
Size
_
store
_
ttl
Methods
_
cleanup
_
cleanup
Loop
clear
delete
get
get
Or
Fetch
has
keys
set
size
@wxn0brp/ac
Loading...