Object -
cache
:
LinkedList
The cache:LinkedList
object consists operations of LinkedList
data structure which are related
to LRU eviction algorithm
Methods
Adds a node to the end of the provided linked list.
Adds a node to the start of the provided linked list.
Removes a node from the provided linked list.
Removes the last node from the provided linked list.
Clears the provided linked list.
Adds a node to the end of the provided linked list.
Parameters
- node Node
-
The node, which should be added to the provided linked list
Adds a node to the start of the provided linked list.
Parameters
- node Node
-
The node, which should be added to the provided linked list
Removes a node from the provided linked list.
Parameters
- node Node
-
The node, which should be removed from the provided linked list
Removes the last node from the provided linked list.
-
Return Type
(Node?) Last node of the provided linked list or
()
if the last node is empty