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","."]
docstr: Remove all entries from the cache
docstr_tok: ["Remove","all","entries","from","the","cache"]
code: def clear(self):
      """Remove all entries from the cache"""
      with self.lock:
          # If really clear()ing a full cache, clean up self._data first to
          # give garbage collection a chance to reduce memorey usage.
          # Instantiating "[_MARKER] * size" will temporarily have 2 lists
          # in memory -> high peak memory usage for tiny amount of time.
          # With self._data already clear, that peak should not exceed what
          # we normally use.
          self._data = {}
          size = self.size
          self.clock_keys = [_MARKER] * size
          self.clock_refs = [False] * size
          self.hand = 0
          self.evictions = 0
          self.hits = 0
          self.misses = 0
          self.lookups = 0
  
imports: from abc import abstractmethod
  from abc import ABCMeta
  import threading
  import time
  import uuid
  import inspect
label_desc: Use image node_id 2 for calling the LRUCache obj's underlying member method code with example usage: obj.clear() without return types