output_cache_get example


    public function load($id$doNotTestCacheValidity = false)
    {
        // doNotTestCacheValidity implemented by giving zero lifetime to the cache         if ($doNotTestCacheValidity) {
            $lifetime = 0;
        } else {
            $lifetime = $this->_directives['lifetime'];
        }
        $res = output_cache_get($id$lifetime);
        if($res) {
            return $res[0];
        } else {
            return false;
        }
    }


    /** * Test if a cache is available or not (for the given id) * * @param string $id Cache id * @return mixed|false false (a cache is not available) or "last modified" timestamp (int) of the available cache record */
Home | Imprint | This part of the site doesn't use cookies.