Delete the write buffer and cache directory.
431291
def delete(self):
        """"""
        if not self._sync:
            del self._buffer
        shutil.rmtree(self.cache_dir)
755820
def purge_all(delete=False, verbosity=0):
    """"""
    _location_purge_all(delete, verbosity)
    _storage_purge_all(delete, verbosity)
1192979
def clear(self):
        
        for f in [x['content'] for x in self.metadata.values()]:
            os.remove(f)

        self.metadata = {}
        self._flush()
458465
def delete(self):
        

        directory = self._directory()
        assert isinstance(directory, Directory)

        realPath = self.realPath
        assert (os.path.exists(realPath))
        os.remove(realPath)

        directory._fileDeleted(self)
581013
def clear(self):
        """"""
        if self._cache is not None:
            with self._cache as c:
                c.clear()
                c.out_deque.clear()
633779
public void purge() {
        SortedQueue queue = getQueue();
        _eventStore.purge(_writeChannel);
        queue.clear();
        _eventStore.purge(_readChannel);
    }
783244
private function cleanPaths()
    {
        $this->output->writeln('');


        if ($this->input->getOption('purge')) {
            $this->output->writeln('<magenta>Purging old cache</magenta>');
            $this->output->writeln('');

            $msg = Cache::purgeJob();
            $this->output->writeln($msg);
        } else {
            $this->output->writeln('<magenta>Clearing cache</magenta>');
            $this->output->writeln('');

            if ($this->input->getOption('all')) {
                $remove = 'all';
            } elseif ($this->input->getOption('assets-only')) {
                $remove = 'assets-only';
            } elseif ($this->input->getOption('images-only')) {
                $remove = 'images-only';
            } elseif ($this->input->getOption('cache-only')) {
                $remove = 'cache-only';
            } elseif ($this->input->getOption('tmp-only')) {
                $remove = 'tmp-only';
            } elseif ($this->input->getOption('invalidate')) {
                $remove = 'invalidate';
            } else {
                $remove = 'standard';
            }

            foreach (Cache::clearCache($remove) as $result) {
                $this->output->writeln($result);
            }
        }
    }
1149598
public static void purgeCache(Configuration conf,
      MRAsyncDiskService service) throws IOException {
    synchronized (cachedArchives) {
      LocalFileSystem localFs = FileSystem.getLocal(conf);
      for (Map.Entry<String,CacheStatus> f: cachedArchives.entrySet()) {
        try {
          deleteLocalPath(service, localFs, f.getValue().localizedLoadPath);
        } catch (IOException ie) {
          LOG.debug("Error cleaning up cache", ie);
        }
      }
      cachedArchives.clear();
    }
  }
182661
def _cleanup(path: str) -> None:
    """"""
    if os.path.isdir(path):
        shutil.rmtree(path)
427627
def delete_cached_files(self, prefixes=[], suffixes=[]):
        
        for filename in listdir(self.cache_directory_path):
            delete = (
                any([filename.endswith(ext) for ext in suffixes]) or
                any([filename.startswith(pre) for pre in prefixes]))
            if delete:
                path = join(self.cache_directory_path, filename)
                logger.info("Deleting %s", path)
                remove(path)
1352261
def clear(self):
        
        self.log(u"Clearing cache...")
        for file_handler, file_info in self.cache.values():
            self.log([u"  Removing file '%s'", file_info])
            gf.delete_file(file_handler, file_info)
        self._initialize_cache()
        self.log(u"Clearing cache... done")
1116999
private static void deleteEveryIn(DirectoryStream<Path> caches) {
        for (Path notActualCache : caches) {
            LOGGER.debug("Deleting redundant cache dir {}", notActualCache);
            try {
                FileUtils.deleteDirectory(notActualCache.toFile());
            } catch (IOException e) {
                LOGGER.error("Can't delete cache dir <{}>", notActualCache, e);
            }
        }
    }
216566
def invalidate_all(self):
        
        for fname in os.listdir(self.cache_path):
            if fname.startswith(self.func.__name__ + "."):
                os.remove(os.path.join(self.cache_path, fname))
758388
def clear_cache(self):
        """"""
        self.logger.debug("Clearing cache")
        if os.path.isdir(self.songcache_dir):
            for filename in os.listdir(self.songcache_dir):
                file_path = os.path.join(self.songcache_dir, filename)
                try:
                    if os.path.isfile(file_path):
                        os.unlink(file_path)
                except PermissionError:
                    pass
                except Exception as e:
                    logger.exception(e)
        self.logger.debug("Cache cleared")
1684
def delete(self):
        """"""
        if self.isfile:
            os.remove(self.fn)
        elif self.isdir:
            shutil.rmtree(self.fn)
689162
def drop_cache(self):
        '''
        
        '''
        del self._cache
        self._cache  = {}
        del self._wqueue
        self._wqueue = set()
        self._cur_size = 0
177751
public void clear() {
        _file_mode = false;
        _write_pos = 0;
        _read_pos = 0;
        _window_low = 0;
        _window_high = _window_size;
        _file_high = 0;
        _mark_pos = 0;
    }