class CacheClearer (View source)

Properties

private EventDispatcher $dispatcher
private Application $application
private DatabaseManager $manager
private Repository $repository
private Filesystem $filesystem
private LoggerInterface $logger
private ObjectCache $caches
private bool $clearGlobalAreas

Methods

__construct(EventDispatcher $dispatcher, DatabaseManager $manager, Repository $repository, Application $application, Filesystem $filesystem, LoggerInterface $logger)

No description

flush()

No description

setClearGlobalAreas(boolean $clearGlobalAreas)

No description

setCache($handle, $cache)

Set a cache object to be cleared

getCaches()

A generator that populates the cache objects from the container

flushCaches()

Flush all the caches

clearCacheDirectory($directory)

Clear out items from the cache directory

filesToClear($directory)

No description

setupFilesystem()

No description

clearDatabaseCache()

No description

clearLocalizationCache()

No description

clearBlockTypeCache()

No description

clearOpcodeCache()

No description

deleteEmptyGlobalAreas()

No description

Details

__construct(EventDispatcher $dispatcher, DatabaseManager $manager, Repository $repository, Application $application, Filesystem $filesystem, LoggerInterface $logger)

Parameters

EventDispatcher $dispatcher
DatabaseManager $manager
Repository $repository
Application $application
Filesystem $filesystem
LoggerInterface $logger

flush()

setClearGlobalAreas(boolean $clearGlobalAreas)

Parameters

boolean $clearGlobalAreas

setCache($handle, $cache)

Set a cache object to be cleared

Parameters

$handle
$cache

protected Generator|FlushableInterface[] getCaches()

A generator that populates the cache objects from the container

Return Value

Generator|FlushableInterface[]

protected flushCaches()

Flush all the caches

protected clearCacheDirectory($directory)

Clear out items from the cache directory

Parameters

$directory

protected Generator|SplFileInfo[] filesToClear($directory)

Parameters

$directory

Return Value

Generator|SplFileInfo[]

private setupFilesystem()

private clearDatabaseCache()

protected clearLocalizationCache()

protected clearBlockTypeCache()

protected clearOpcodeCache()

protected deleteEmptyGlobalAreas()