public function update($key, $value, $namespace, $lifetime = null, $userdata = null)
    {
        // Get internal used key
        $key = $this->calculateUuid($key . $namespace);

        // Build dataset from input
        $dataset = array(
            $this->getExpiresAbsolute($lifetime),
            $userdata,
            $this->encode($value),
            $namespace,
        );

        if (
            true !== $result = $this->connection->replace(
                $key,
                $dataset,
                ($this->getCompress() === true) ? MEMCACHE_COMPRESSED : 0,
                $this->getExpiresAbsolute($lifetime)
            )
        ) {
            throw new Doozr_Cache_Service_Exception(
                'Error while updating dataset!'
            );
        }

        if ($result === true) {
            // On create we need to purge the old entry from runtime cache ...
            $this->addToRuntimeCache(
                $key,
                $dataset,
                $namespace
            );
        }

        return true;
    }
public function update($key, $value, $namespace, $lifetime = null, $userdata = null)
    {
        // Get internal used key
        $key = $this->calculateUuid($key . $namespace);

        // Build dataset from input
        $dataset = array(
            $this->getExpiresAbsolute($lifetime),
            $userdata,
            $this->encode($value),
            $namespace,
        );

        if (
            true !== $result = $this->connection->replace(
                $key,
                $dataset,
                ($this->getCompress() === true) ? MEMCACHE_COMPRESSED : 0,
                $this->getExpiresAbsolute($lifetime)
            )
        ) {
            throw new Doozr_Cache_Service_Exception(
                'Error while updating dataset!'
            );
        }

        if ($result === true) {
            // On create we need to purge the old entry from runtime cache ...
            $this->addToRuntimeCache(
                $key,
                $dataset,
                $namespace
            );
        }

        return true;
    }
public function update ( $ key , $ value , $ namespace , $ lifetime = null , $ userdata = null ) { // Get internal used key $ key = $ this -> calculateUuid ( $ key . $ namespace ) ; // Build dataset from input $ dataset = array ( $ this -> getExpiresAbsolute ( $ lifetime ) , $ userdata , $ this -> encode ( $ value ) , $ namespace , ) ; if ( true !== $ result = $ this -> connection -> replace ( $ key , $ dataset , ( $ this -> getCompress ( ) === true ) ? MEMCACHE_COMPRESSED : 0 , $ this -> getExpiresAbsolute ( $ lifetime ) ) ) { throw new Doozr_Cache_Service_Exception ( 'Error while updating dataset!' ) ; } if ( $ result === true ) { // On create we need to purge the old entry from runtime cache ... $ this -> addToRuntimeCache ( $ key , $ dataset , $ namespace ) ; } return true ; }
Updates data in cache.

@param string $key       The dataset Id
@param string $value     The data to write to cache
@param string $namespace The dataset namespace
@param int    $lifetime  Date/Time on which the cache-entry expires
@param string $userdata  The custom userdata to add

@return bool TRUE on success, otherwise FALSE
@author Benjamin Carl <opensource@clickalicious.de>
@access public
@throws Doozr_Cache_Service_Exception
Updates data in cache .