/** * Flush cache * @param string|null $ps_namespace Optional namespace definition. If given, only this namespace is wiped. * @throws MemoryCacheInvalidParameterException */ public static function flush($ps_namespace = null) { if (!$ps_namespace) { self::$opa_caches = array(); } else { if (!is_string($ps_namespace)) { throw new MemoryCacheInvalidParameterException('Namespace has to be a string'); } self::$opa_caches[$ps_namespace] = array(); } }