Preparing search index...
The search index is not available
Welshman Docs
Welshman Docs
@welshman/lib
LRUCache
Class LRUCache<T, U>
Least Recently Used (LRU) cache implementation
Type Parameters
T
Type of cache keys
U
Type of cache values
Index
Constructors
constructor
Properties
keys
map
max
Size
Methods
get
has
set
Constructors
constructor
new
LRUCache
<
T
,
U
>
(
maxSize
?:
number
)
:
LRUCache
<
T
,
U
>
Type Parameters
T
U
Parameters
maxSize
:
number
= Infinity
Returns
LRUCache
<
T
,
U
>
Properties
keys
keys
:
T
[]
= []
map
map
:
Map
<
T
,
U
>
= ...
Readonly
max
Size
maxSize
:
number
= Infinity
Methods
get
get
(
k
:
T
)
:
undefined
|
U
Parameters
k
:
T
Returns
undefined
|
U
has
has
(
k
:
T
)
:
boolean
Parameters
k
:
T
Returns
boolean
set
set
(
k
:
T
,
v
:
U
)
:
void
Parameters
k
:
T
v
:
U
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
keys
map
max
Size
Methods
get
has
set
Welshman Docs
Loading...
Least Recently Used (LRU) cache implementation