Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CacheList

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

member

head - dummy head of the linked list

member

tail - dummy tail of the linked list

member

hashtable - the hashtable which maps cache key to list node

member

length - length of the list

Hierarchy

  • CacheList

Index

Constructors

constructor

Methods

clearList

  • clearList(): void

containsKey

  • containsKey(key: string): boolean

getKeys

  • getKeys(): string[]

getLastItem

  • getLastItem(): string

getSize

  • getSize(): number

insertItem

  • insertItem(key: string): void

isEmpty

  • isEmpty(): boolean

isHeadNode

  • isHeadNode(key: string): boolean

isTailNode

  • isTailNode(key: string): boolean

refresh

  • refresh(key: string): void

removeItem

  • removeItem(key: string): void