@tspro/ts-utils-lib
Preparing search index...
LRUCache
Class LRUCache<K, V>
LRUCache is an implementation of least recently used cache with a fixed capacity.
Type Parameters
K
extends
string
V
Index
Constructors
constructor
Methods
get
set
Constructors
constructor
new
LRUCache
<
K
extends
string
,
V
>
(
maxSize
:
number
,
maxKeyLength
?:
number
,
)
:
LRUCache
<
K
,
V
>
Type Parameters
K
extends
string
V
Parameters
maxSize
:
number
maxKeyLength
:
number
= Infinity
Returns
LRUCache
<
K
,
V
>
Methods
get
get
(
key
:
K
)
:
undefined
|
V
Parameters
key
:
K
Returns
undefined
|
V
set
set
(
key
:
K
,
value
:
V
)
:
void
Parameters
key
:
K
value
:
V
Returns
void
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
get
set
@tspro/ts-utils-lib
Loading...
LRUCache is an implementation of least recently used cache with a fixed capacity.