public function save($id, $data, $lifetime = null, $tag = null)
    {
        try {
            if (\apc_store($id, $data, $lifetime)) {
                $this->_hashmap[$tag][$id] = array("time" => time(), "ttl" => $lifetime);

                return $this->saveHashmap();
            } else {
                return false;
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to save cache for id %s : %s', $id, $e->getMessage()));

            return false;
        }

        return true;
    }
public function save($id, $data, $lifetime = null, $tag = null)
    {
        try {
            if (\apc_store($id, $data, $lifetime)) {
                $this->_hashmap[$tag][$id] = array("time" => time(), "ttl" => $lifetime);

                return $this->saveHashmap();
            } else {
                return false;
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to save cache for id %s : %s', $id, $e->getMessage()));

            return false;
        }

        return true;
    }
public function save ( $ id , $ data , $ lifetime = null , $ tag = null ) { try { if ( \ apc_store ( $ id , $ data , $ lifetime ) ) { $ this -> _hashmap [ $ tag ] [ $ id ] = array ( "time" => time ( ) , "ttl" => $ lifetime ) ; return $ this -> saveHashmap ( ) ; } else { return false ; } } catch ( \ Exception $ e ) { $ this -> log ( 'warning' , \ sprintf ( 'Unable to save cache for id %s : %s' , $ id , $ e -> getMessage ( ) ) ) ; return false ; } return true ; }
Store provided data into cache.

@param string $id       Cache id
@param mixed  $data     Datas to cache
@param int    $lifetime Optional, the specific lifetime for this record (by default null, infinite lifetime)
@param string $tag      Optional, an associated tag to the stored data

@return boolean TRUE if cache is stored FALSE otherwise
Store provided data into cache .