src/SilverStripe/InvalidationExtension.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Invalidates a cache by a certain name, and logs if available
@param $name
@param $message
@param \Psr\Log\LoggerInterface|null $logger
Invalidates a cache by a certain name and logs if available