_expireTime example


    public function save($data$id$tags = array()$specificLifetime = false)
    {
        $lifetime = $this->getLifetime($specificLifetime);
        $metadatas = array(
            'mtime' => time(),
            'expire' => $this->_expireTime($lifetime),
        );

        if (count($tags) > 0) {
            $this->_log('Zend_Cache_Backend_ZendServer::save() : tags are unsupported by the ZendServer backends');
        }

        return  $this->_store($data$id$lifetime) &&
                $this->_store($metadatas, 'internal-metadatas---' . $id$lifetime);
    }

    /** * Remove a cache record * * @param string $id cache id * @return boolean true if no problem */
return false;
            }
        }
        if ($this->_options['read_control']) {
            $hash = $this->_hash($data$this->_options['read_control_type']);
        } else {
            $hash = '';
        }
        $metadatas = array(
            'hash' => $hash,
            'mtime' => time(),
            'expire' => $this->_expireTime($this->getLifetime($specificLifetime)),
            'tags' => $tags
        );
        $res = $this->_setMetadatas($id$metadatas);
        if (!$res) {
            $this->_log('Zend_Cache_Backend_File::save() / error on saving metadata');
            return false;
        }
        $res = $this->_filePutContents($file$data);
        return $res;
    }

    
Home | Imprint | This part of the site doesn't use cookies.