initialization
clean up the list and hashtable
true if the key is in the hashtable
all keys in the hashtable
the LAST Recently Visited key
length of the list
insert new node to the head and add it in the hashtable
the key of the node
true if list is empty
mainly for test
true if key is the head node
mainly for test
true if key is the tail node
refresh node so it is rotated to the head
key of the node
remove the cache key from the list and hashtable
the key of the node
double linked list plus a hash table inside each key in the cache stored as a node in the list recently visited node will be rotated to the head so the Last Recently Visited node will be at the tail
head - dummy head of the linked list
tail - dummy tail of the linked list
hashtable - the hashtable which maps cache key to list node
length - length of the list