abstract class OpcodeCacheHelper (View source)

This class contains a helper to clear PHP Opcode Caches, auto-detecting the current opcache system in use.

It has been inspired by the corresponding functionality in TYPO3 CMS (OpcodeCacheUtility.php), especially the cache- invalidate functions.

Properties

static protected Closure[] $clearCacheCallbacks

Contains callback functions for all active Opcode caches which can be used to flush a file.

static protected bool $initialized

Methods

static void
initialize()

Initialize the ClearCache-Callbacks

static void
clearAllActive(string $absolutePathAndFilename = null)

Clear a PHP file from all active cache files. Also supports to flush the cache completely, if called without parameter.

Details

static protected void initialize()

Initialize the ClearCache-Callbacks

Return Value

void

static void clearAllActive(string $absolutePathAndFilename = null)

Clear a PHP file from all active cache files. Also supports to flush the cache completely, if called without parameter.

Parameters

string $absolutePathAndFilename

Absolute path towards the PHP file to clear.

Return Value

void