class_docstr: Implements a pseudo-LRU algorithm (CLOCK)
  
  The Clock algorithm is not kept strictly to improve performance, e.g. to
  allow get() and invalidate() to work without acquiring the lock.
class_docstr_tok: ["Implements","a","pseudo-LRU","algorithm","(","CLOCK",")","The","Clock","algorithm","is","not","kept","strictly","to","improve","performance",",","e.g",".","to","allow","get","(",")","and","invalidate","(",")","to","work","without","acquiring","the","lock","."]
code: def __init__(self, size):
      size = int(size)
      if size < 1:
          raise ValueError("size must be >0")
      self.size = size
      self.lock = threading.Lock()
      self.hand = 0
      self.maxpos = size - 1
      self.clock_keys = None
      self.clock_refs = None
      self._data = None
      self.evictions = 0
      self.hits = 0
      self.misses = 0
      self.lookups = 0
      self.clear()
  
imports: from abc import abstractmethod
  from abc import ABCMeta
  import threading
  import time
  import uuid
  import inspect
label_desc: Use image node_id 1 to create a new LRUCache object from inherited base classes: Cache with example: obj = LRUCache(size)