protected static function initialize()
    {
        self::$clearCacheCallbacks = [];

        // Zend OpCache (built in by default since PHP 5.5) - http://php.net/manual/de/book.opcache.php
        if (extension_loaded('Zend OPcache') && ini_get('opcache.enable') === '1') {
            self::$clearCacheCallbacks[] = function ($absolutePathAndFilename) {
                if ($absolutePathAndFilename !== null && function_exists('opcache_invalidate')) {
                    opcache_invalidate($absolutePathAndFilename);
                } else {
                    opcache_reset();
                }
            };
        }

        // WinCache - http://www.php.net/manual/de/book.wincache.php
        if (extension_loaded('wincache') && ini_get('wincache.ocenabled') === '1') {
            self::$clearCacheCallbacks[] = function ($absolutePathAndFilename) {
                if ($absolutePathAndFilename !== null) {
                    wincache_refresh_if_changed([$absolutePathAndFilename]);
                } else {
                    // Refresh everything!
                    wincache_refresh_if_changed();
                }
            };
        }

        // XCache - http://xcache.lighttpd.net/
        // Supported in version >= 3.0.1
        if (extension_loaded('xcache')) {
            self::$clearCacheCallbacks[] = function ($absolutePathAndFilename) {
                // XCache can only be fully cleared.
                if (!ini_get('xcache.admin.enable_auth')) {
                    xcache_clear_cache(XC_TYPE_PHP);
                }
            };
        }
    }