Search
Preparing search index...
The search index is not available
DefinitelyTyped
Inherited
Private
Externals
Only exported
lru-cache
Dynamic module lru-cache
Index
Functions
LRU
Functions
LRU
(
opts
:
Options
)
:
Cache
Parameters
opts:
Options
Returns
Cache
LRU
(
max
:
number
)
:
Cache
Parameters
max:
number
Returns
Cache
Cache
:
Cache
public
del
(
key
:
string
)
Parameters
key:
string
public
forEach
(
iter
:
(value: T, key: string, cache: 'lru-cache'.LRU.Cache<T>) => void
, thisp
?:
any
)
Parameters
iter:
(value: T, key: string, cache: 'lru-cache'.LRU.Cache<T>) => void
thisp?:
any
optional
public
get
(
key
:
string
)
:
T in 'lru-cache'.LRU.Cache<T>
Parameters
key:
string
Returns
T in 'lru-cache'.LRU.Cache<T>
public
has
(
key
:
string
)
:
boolean
Parameters
key:
string
Returns
boolean
public
keys
(
)
:
Array<string>
Returns
Array<string>
public
peek
(
key
:
string
)
:
T in 'lru-cache'.LRU.Cache<T>
Parameters
key:
string
Returns
T in 'lru-cache'.LRU.Cache<T>
public
reset
(
)
public
set
(
key
:
string
, value
:
T in 'lru-cache'.LRU.Cache<T>
)
Parameters
key:
string
value:
T in 'lru-cache'.LRU.Cache<T>
public
values
(
)
:
Array<T>
Returns
Array<T>
Options
:
Options
optional
public
dispose
?:
(key: string, value: T) => void
optional
public
length
?:
(value: T) => number
optional
public
max
?:
number
optional
public
maxAge
?:
number
optional
public
stale
?:
boolean
Globals
lru-cache
LRU