Added enable_cache_dir attribute to enable or disable cache_dir (@phutchins)