@Override
  public synchronized long size() {
    return wrappedCollection.size() + cache.size();
  }
Instantiates a new Caching task collection.

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