class_docstr: A disk-backed cache for dataframes.
  
  ``dataframe_cache`` is a mutable mapping from string names to pandas
  DataFrame objects.
  This object may be used as a context manager to delete the cache directory
  on exit.
  
  Parameters
  ----------
  path : str, optional
      The directory path to the cache. Files will be written as
      ``path/<keyname>``.
  lock : Lock, optional
      Thread lock for multithreaded/multiprocessed access to the cache.
      If not provided no locking will be used.
  clean_on_failure : bool, optional
      Should the directory be cleaned up if an exception is raised in the
      context manager.
  serialize : {'msgpack', 'pickle:<n>'}, optional
      How should the data be serialized. If ``'pickle'`` is passed, an
      optional pickle protocol can be passed like: ``'pickle:3'`` which says
      to use pickle protocol 3.
  
  Notes
  -----
  The syntax ``cache[:]`` will load all key:value pairs into memory as a
  dictionary.
  The cache uses a temporary file format that is subject to change between
  versions of zipline.
class_docstr_tok: ["A","disk-backed","cache","for","dataframes",".","``","dataframe_cache","``","is","a","mutable","mapping","from","string","names","to","pandas","DataFrame","objects",".","This","object","may","be","used","as","a","context","manager","to","delete","the","cache","directory","on","exit",".","Parameters","--","--","--","--","--","path",":","str",",","optional","The","directory","path","to","the","cache",".","Files","will","be","written","as","``","path\/","<","keyname",">","``",".","lock",":","Lock",",","optional","Thread","lock","for","multithreaded\/multiprocessed","access","to","the","cache",".","If","not","provided","no","locking","will","be","used",".","clean_on_failure",":","bool",",","optional","Should","the","directory","be","cleaned","up","if","an","exception","is","raised","in","the","context","manager",".","serialize",":","{","'msgpack","'",",","'pickle",":","<","n",">","'","}",",","optional","How","should","the","data","be","serialized",".","If","``","'pickle","'","``","is","passed",",","an","optional","pickle","protocol","can","be","passed","like",":","``","'pickle:3","'","``","which","says","to","use","pickle","protocol","3",".","Notes","--","--","-","The","syntax","``","cache","[",":","]","``","will","load","all","key",":","value","pairs","into","memory","as","a","dictionary",".","The","cache","uses","a","temporary","file","format","that","is","subject","to","change","between","versions","of","zipline","."]
code: def __delitem__(self, key):
      with self.lock:
          try:
              os.remove(self._keypath(key))
          except OSError as e:
              if e.errno == errno.ENOENT:
                  # raise a keyerror if this directory did not exist
                  raise KeyError(key)
              # reraise the actual oserror otherwise
              raise
  
imports: from collections import MutableMapping
  import errno
  from functools import partial
  import os
  import pickle
  from distutils import dir_util
  from shutil import rmtree, move
  from tempfile import mkdtemp, NamedTemporaryFile
  import pandas
  from .compat import PY2
  from .context_tricks import nop_context
  from .paths import ensure_directory
  from .sentinel import sentinel
label_desc: Use image node_id 8 for calling the dataframe_cache obj's underlying member method code with example usage: obj.__delitem__(key) without return types