public function set($key, $value, $ttl)
    {
        if (!$this->memcached->set($key, $value, $ttl)) {
            // If set() returns false, that means the key already exists,
            return $this->memcached->replace($key, $value, $ttl);
        } else {
            // set() returned true, so the key has been set successfully
            return true;
        }
    }
public function set($key, $value, $ttl)
    {
        if (!$this->memcached->set($key, $value, $ttl)) {
            // If set() returns false, that means the key already exists,
            return $this->memcached->replace($key, $value, $ttl);
        } else {
            // set() returned true, so the key has been set successfully
            return true;
        }
    }
public function set ( $ key , $ value , $ ttl ) { if ( ! $ this -> memcached -> set ( $ key , $ value , $ ttl ) ) { // If set() returns false, that means the key already exists, return $ this -> memcached -> replace ( $ key , $ value , $ ttl ) ; } else { // set() returned true, so the key has been set successfully return true ; } }
Stores into the cache

@param string $key
@param mixed $value
@param integer $ttl
@return boolean
Stores into the cache