private function performCallbackOnCachedPersister(callable $callback)
    {
        if (! $this->hasCache) {
            return;
        }

        foreach (array_merge($this->entityPersisters, $this->collectionPersisters) as $persister) {
            if ($persister instanceof CachedPersister) {
                $callback($persister);
            }
        }
    }