protected function invalidate($name, $message, $logger = null)
    {
        // Flush in both draft + live
        Versioned::withVersionedMode(function () use ($name) {
            foreach ([Versioned::LIVE, Versioned::DRAFT] as $stage) {
                Versioned::set_stage($stage);
                $this->cache->flushByName($name);
            }
        });

        if ($logger) {
            $logger->info($message);
        }
    }