framework/caching/MemCache.php
protected function setValue($key, $value, $duration)
    {
        // Use UNIX timestamp since it doesn't have any limitation
        // @see https://secure.php.net/manual/en/memcache.set.php
        // @see https://secure.php.net/manual/en/memcached.expiration.php
        $expire = $duration > 0 ? $duration + time() : 0;

        return $this->useMemcached ? $this->_cache->set($key, $value, $expire) : $this->_cache->set($key, $value, 0, $expire);
    }
protected function setValue($key, $value, $duration)
    {
        // Use UNIX timestamp since it doesn't have any limitation
        // @see https://secure.php.net/manual/en/memcache.set.php
        // @see https://secure.php.net/manual/en/memcached.expiration.php
        $expire = $duration > 0 ? $duration + time() : 0;

        return $this->useMemcached ? $this->_cache->set($key, $value, $expire) : $this->_cache->set($key, $value, 0, $expire);
    }
protected function setValue ( $ key , $ value , $ duration ) { // Use UNIX timestamp since it doesn't have any limitation // @see https://secure.php.net/manual/en/memcache.set.php // @see https://secure.php.net/manual/en/memcached.expiration.php $ expire = $ duration > 0 ? $ duration + time ( ) : 0 ; return $ this -> useMemcached ? $ this -> _cache -> set ( $ key , $ value , $ expire ) : $ this -> _cache -> set ( $ key , $ value , 0 , $ expire ) ; }
Stores a value identified by a key in cache.
This is the implementation of the method declared in the parent class.

@param string $key the key identifying the value to be cached
@param mixed $value the value to be cached.
@see [Memcache::set()](https://secure.php.net/manual/en/memcache.set.php)
@param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
@return bool true if the value is successfully stored into cache, false otherwise
Stores a value identified by a key in cache . This is the implementation of the method declared in the parent class .