/** * Reset all caches. * @param bool $phpunitreset */ public static function reset_caches($phpunitreset = false) { if ($phpunitreset) { self::$singletoninstance = null; } else { if (self::$singletoninstance) { self::$singletoninstance->pluginsinfo = null; self::$singletoninstance->subpluginsinfo = null; self::$singletoninstance->installedplugins = null; self::$singletoninstance->enabledplugins = null; self::$singletoninstance->presentplugins = null; self::$singletoninstance->plugintypes = null; } } $cache = cache::make('core', 'plugin_manager'); $cache->purge(); }