_makeId example



        $cacheBool1 = $this->_specificOptions['cache_by_default'];
        $cacheBool2 = in_array($name$this->_specificOptions['cached_functions']);
        $cacheBool3 = in_array($name$this->_specificOptions['non_cached_functions']);
        $cache = (($cacheBool1 || $cacheBool2) && (!$cacheBool3));
        if (!$cache) {
            // Caching of this callback is disabled             return call_user_func_array($callback$parameters);
        }

        $id = $this->_makeId($callback$parameters);
        if ( ($rs = $this->load($id)) && isset($rs[0]$rs[1])) {
            // A cache is available             $output = $rs[0];
            $return = $rs[1];
        } else {
            // A cache is not available (or not valid for this frontend)             ob_start();
            ob_implicit_flush(false);
            $return = call_user_func_array($callback$parameters);
            $output = ob_get_clean();
            $data = array($output$return);
            
$this->_activeOptions = $this->_specificOptions['default_options'];
        if ($lastMatchingRegexp !== null) {
            $conf = $this->_specificOptions['regexps'][$lastMatchingRegexp];
            foreach ($conf as $key=>$value) {
                $this->_activeOptions[$key] = $value;
            }
        }
        if (!($this->_activeOptions['cache'])) {
            return false;
        }
        if (!$id) {
            $id = $this->_makeId();
            if (!$id) {
                return false;
            }
        }
        $array = $this->load($id);
        if ($array !== false) {
            $data = $array['data'];
            $headers = $array['headers'];
            if (!headers_sent()) {
                foreach ($headers as $key=>$headerCouple) {
                    $name = $headerCouple[0];
                    


        $cacheBool1 = $this->_specificOptions['cache_by_default'];
        $cacheBool2 = in_array($name$this->_specificOptions['cached_methods']);
        $cacheBool3 = in_array($name$this->_specificOptions['non_cached_methods']);
        $cache = (($cacheBool1 || $cacheBool2) && (!$cacheBool3));
        if (!$cache) {
            // We do not have not cache             return call_user_func_array($callback$parameters);
        }

        $id = $this->_makeId($name$parameters);
        if ( ($rs = $this->load($id)) && isset($rs[0]$rs[1]) ) {
            // A cache is available             $output = $rs[0];
            $return = $rs[1];
        } else {
            // A cache is not available (or not valid for this frontend)             ob_start();
            ob_implicit_flush(false);

            try {
                $return = call_user_func_array($callback$parameters);
                
Home | Imprint | This part of the site doesn't use cookies.