public void clear(){
synchronized (lock) {
    File[] files=cachePath.listFiles();
    if (files == null) {
      return;
    }
    for (    File file : files) {
      removeFile(file);
    }
    pendingTasks.clear();
  }
}

public void clear ( ) { synchronized ( lock ) { File [ ] files = cachePath . listFiles ( ) ; if ( files == null ) { return ; } for ( File file : files ) { removeFile ( file ) ; } pendingTasks . clear ( ) ; } }
gets rid of all pending commands .
