protected function purgeRuntimeCache($key = null, $namespace = null)
    {
        // Assume will fail
        $result = false;

        if ($namespace !== null && !isset($this->runtimeCache[$namespace])) {
            // Nothing to do is a success when purging ...
            $result = true;

        } else {
            // Hard reset when both null ...
            if ($key === null && $namespace === null) {
                $this->runtimeCache = [];

            } else {
                if ($key === null) {
                    $this->runtimeCache[$namespace] = [];
                } else {
                    unset($this->runtimeCache[$namespace][$key]);
                }

            }
        }

        return $result;
    }
protected function purgeRuntimeCache($key = null, $namespace = null)
    {
        // Assume will fail
        $result = false;

        if ($namespace !== null && !isset($this->runtimeCache[$namespace])) {
            // Nothing to do is a success when purging ...
            $result = true;

        } else {
            // Hard reset when both null ...
            if ($key === null && $namespace === null) {
                $this->runtimeCache = [];

            } else {
                if ($key === null) {
                    $this->runtimeCache[$namespace] = [];
                } else {
                    unset($this->runtimeCache[$namespace][$key]);
                }

            }
        }

        return $result;
    }
protected function purgeRuntimeCache ( $ key = null , $ namespace = null ) { // Assume will fail $ result = false ; if ( $ namespace !== null && ! isset ( $ this -> runtimeCache [ $ namespace ] ) ) { // Nothing to do is a success when purging ... $ result = true ; } else { // Hard reset when both null ... if ( $ key === null && $ namespace === null ) { $ this -> runtimeCache = [ ] ; } else { if ( $ key === null ) { $ this -> runtimeCache [ $ namespace ] = [ ] ; } else { unset ( $ this -> runtimeCache [ $ namespace ] [ $ key ] ) ; } } } return $ result ; }
Purges the runtime cache.

@param string|null $key       The key to purge from runtime cache
@param string|null $namespace The namespace to purge, or NULL to purge all namespaces

@author Benjamin Carl <opensource@clickalicious.de>
@return bool TRUE if runtime cache was purged, otherwise FALSE
@access protected
@throws Doozr_Cache_Service_Exception
Purges the runtime cache .