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: Returns FALSE when the requested key has either not been loaded yet, or has reached the end
  of its caching ttl.
  
  Params:
      key (string)
  
  Returns:
      bool
docstr_tok: ["Returns","FALSE","when","the","requested","key","has","either","not","been","loaded","yet",",","or","has","reached","the","end","of","its","caching","ttl",".","Params",":","key","(","string",")","Returns",":","bool"]
code: def has(self, key):
      """
      Returns FALSE when the requested key has either not been loaded yet, or has reached the end
      of its caching ttl.
  
      Params:
          key (string)
  
      Returns:
          bool
      """
      if key not in self._ttls:
          return False
  
      return self._clock.utcnow() <= self._ttls[key]
  
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 3 for calling the DriverCache obj's underlying member method code with example usage: obj.has(key) and returns: unknown, False