zend_disk_cache_store example

/** * Store data * * @param mixed $data Object to store * @param string $id Cache id * @param int $timeToLive Time to live in seconds * @return boolean true if no problem */
    protected function _store($data$id$timeToLive)
    {
        if (zend_disk_cache_store($this->_options['namespace'] . '::' . $id,
                                  $data,
                                  $timeToLive) === false) {
            $this->_log('Store operation failed.');
            return false;
        }
        return true;
    }

    /** * Fetch data * * @param string $id Cache id */
Home | Imprint | This part of the site doesn't use cookies.