在session节点下存值
@param  $key
@param  $value
@param  $expire 有效时间（单位秒）
348219
public function setValAndExpire($key, $value, $expire = 86400) {
		ini_set('session.gc_maxlifetime', $expire);
		session_set_cookie_params($expire);
		if(!isset($_SESSION)){
			session_start();
		}
		$_SESSION[$key] = $value;
	}
496559
public function set($name, $value, $expire = null) {
        if (is_null($expire)) {
            $expire = $this->options['expire'];
        }
        //if ($this->tag && !$this->has($name)) {
        //    $first = true;
        //}
        //$key = $this->getCacheKey($name);
        $expire = 0 == $expire ? 0 : $_SERVER['REQUEST_TIME'] + $expire;
        if ($this->handler->set($name, $value, $expire)) {
            //isset($first) && $this->setTagItem($name);
            return true;
        }
        return false;
    }
473732
public static function set($key, $value = null, $expiration = null)
    {
        if (!self::$instance) {
            return null;
        }

        self::$instance->cache->set($key, $value, $expiration);

        return self::$instance;
    }
83498
public function decrement($key, $value = 1, $expiration = 0)
    {
        $new = intval($this->get($key));
        $new -= $value;
        $this->set($key, $new, $expiration);
    }
972186
public function addCookie(string $key, $value, \DateTimeInterface $expire)
    {
        $this->cookies[$key] = $this->cookieFactory->build($key, $value, $expire);
    }
1161893
public function set(string $field, string $key, $data, int $expire = self::EXPIRE): bool
    {
        // 缓存数据
        $this->doSet($key, $data, $expire);

        //记录调试信息
        self::debugSet($field . ':' . $key, $data);

        // 取出此表已经缓存的所有键
        $keys = $this->get(self::PREFIX_FIELD . $field);
        if (!$keys or $keys == CacheFactory::NOT_FOUND) {
            $keys = [];
        }

        // 增加一个键,并保存回去,以便以后统一清除
        $keys[] = $key;
        return $this->doSet(self::PREFIX_FIELD . $field, $keys, $expire);
    }
489548
public function setTtl($key, $expire)
    {
        if (is_null($expire)) {
            return;
        }

        $expire = (int) $expire;

        if ($expire > 0) {
            $this->getConnection()->expire($key, $expire);
        } else {
            $this->getConnection()->persist($key);
        }
    }
785723
public function setRaw(string $value, int $expire = 0): bool
    {
        return parent::setString($value, $expire);
    }
651744
public function save( $key, $value, $expire = 0 ) {
		$key = $this->get_key( $key );
		wp_cache_set( $key, $value, $this->group, $expire );
	}
111151
public function add($key, $value, $expiration = null)
    {

        return $this->set($key, $value, $expiration);
    }
530601
public function replace($key, $value, $expiration = 0)
    {
        return $this->memcached ? $this->memcached->replace($key, $value, $expiration) : false;
    }
159317
public function set($name, $value, $expire = null) {
        N('cache_write',1);
        if(is_null($expire)) {
            $expire  =  $this->options['expire'];
        }
        $name   =   $this->options['prefix'].$name;
        if($result = apc_store($name, $value, $expire)) {
            if($this->options['length']>0) {
                // 记录缓存队列
                $this->queue($name);
            }
        }
        return $result;
     }
191998
public function write($key, $value, $expire = null) 
    {
        if (!$this->enabled) {
            return ;
        }

        if ($expire === null) {
            $expire = $this->expire;
        }
        
        $data = [
            'time'   => time(),
            'expire' => time() + $expire,
            'value'  => $value,
        ];
    
        $this->stats['execTimes'] ++;
        $this->stats['writeTimes'] ++;            
        $this->stats['writeSize'] += strlen(var_export($value, true))/1024;
        $this->temp[$key] = $data;
        
        try {
            $this->waitUnlock($key);
            $this->lock($key);
            $this->store($key, $data);
            $this->unlock($key);
        } catch (\wf\cache\Exception $e) {
            $this->unlock($key);
            throw $e;
        }
    }
1167368
public static function set($name, $value = '', $expire = 0)
    {
        !isset(self::$init) && self::init();

        if ($expire !== 0) {
            $expire = !empty(self::$config['expire']) ? $_SERVER['REQUEST_TIME'] + intval(self::$config['expire']) : 0;
        }

        if (is_string($name)) {
            setcookie(
                $name, $value, $expire, self::$config['path'],
                self::$config['domain'], self::$config['secure']
            );
        }

        if (is_array($name)) {
            foreach ($name as $item => $val) {
                setcookie(
                    $name, $val, $expire, self::$config['path'],
                    self::$config['domain'], self::$config['secure']
                );
            }
        }
    }
1047709
public function update($key, $value, $expire = 0)
    {
        if ($this->type === 1) {
            return $this->memcache->replace($key, $value, $expire);
        } else {
            return $this->memcache->replace($this->conf['prefix'] . $key, json_encode($value, JSON_UNESCAPED_UNICODE), false, $expire);
        }

    }
474271
public static function set( $key, $value, $expire = 0 ) {
		
		// set the expire date 
		if ( $expire > 0 ) {
			
			if ( $expire < time() ) {
				$expire = time() + $expire;
			}
		}
		
		CCServer::$_instance->COOKIE[$key] = $value;
		
		/*
		 * Finally set the cookie
		 * @toDo: just at the cookie to an array an set the set cookie header from the CCResponse
		 */
		return setcookie( 
			$key, 
			$value, 
			$expire, 
			static::$path, 
			static::$domain, 
			static::$secure, 
			static::$httponly 
		);
	}
1142058
public function set($name, $value, $expire = NULL) {
        if (isset($this->config['crypt'])) {
            $value = $this->config['crypt']->encrypt($value, $this->config['key']);
        }

        $_COOKIE[$name] = $value;
        if ($expire < $_SERVER['REQUEST_TIME']) {
            unset($_COOKIE[$name]);
        }

        return parent::set($name, $value, $expire);
    }