_file example


    public function load($id$doNotTestCacheValidity = false)
    {
        if (!($this->_test($id$doNotTestCacheValidity))) {
            // The cache is not hit !             return false;
        }
        $metadatas = $this->_getMetadatas($id);
        $file = $this->_file($id);
        $data = $this->_fileGetContents($file);
        if ($this->_options['read_control']) {
            $hashData = $this->_hash($data$this->_options['read_control_type']);
            $hashControl = $metadatas['hash'];
            if ($hashData != $hashControl) {
                // Problem detected by the read control !                 $this->_log('Zend_Cache_Backend_File::load() / read_control : stored hash and computed hash do not match');
                $this->remove($id);
                return false;
            }
        }
        
Home | Imprint | This part of the site doesn't use cookies.