@Override
  public synchronized void clear() {
    assertNotClosed();
    wrappedCollection.clear();
    outstandingTasks.clear();
    cache.clear();
  }
Instantiates a new Caching task collection.

@param collection the collection
services/tasks/src/main/java/org/hyperledger/besu/services/tasks/CachingTaskCollection.java