class_docstr: A class that is responsible for caching objects in-memory.
  
  This class is to intended to be used in the following pattern:
  
  def get(key, default=None):
      if not cache.has(key):
          try:
              data = load_data(key)
              cache.set(key, data)
          except NoSuchKeyException:
              cache.blank(key)
  
      return cache.get(key, default)
class_docstr_tok: ["A","class","that","is","responsible","for","caching","objects","in-memory",".","This","class","is","to","intended","to","be","used","in","the","following","pattern",":","def","get","(","key",",","default=None",")",":","if","not","cache.has","(","key",")",":","try",":","data","=","load_data","(","key",")","cache.set","(","key",",","data",")","except","NoSuchKeyException",":","cache.blank","(","key",")","return","cache.get","(","key",",","default",")"]
docstr: Constructor
  
  Params:
      maximum_key_count (int)
          The maximum number of keys allowed in this cache before records start getting
          evicted. Eviction is at random. A maximum key count of 0 or less means the cache
          size is unlimited and will perform no evictions (dangerous!!!)
docstr_tok: ["Constructor","Params",":","maximum_key_count","(","int",")","The","maximum","number","of","keys","allowed","in","this","cache","before","records","start","getting","evicted",".","Eviction","is","at","random",".","A","maximum","key","count","of","0","or","less","means","the","cache","size","is","unlimited","and","will","perform","no","evictions","(","dangerous","!","!","!",")"]
code: def __init__(self, maximum_key_count=0):
      """
      Constructor
  
      Params:
          maximum_key_count (int)
              The maximum number of keys allowed in this cache before records start getting
              evicted. Eviction is at random. A maximum key count of 0 or less means the cache
              size is unlimited and will perform no evictions (dangerous!!!)
      """
      self._data = {}
      self._ttls = {}
      self._clock = DriverCacheClock()
  
      self._maximum_key_count = maximum_key_count
  
file_path: streamalert/streamalert/shared/lookup_tables/cache.py
imports: import copy
  from datetime import datetime, timedelta
  import random
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 1 to create a new DriverCache object  with example: obj = DriverCache(maximum_key_count)