@param null|mixed $expiresIn

@return void
342663
private function setExpiresIn($expiresIn)
    {
        if (null !== $expiresIn) {
            if (false === \is_int($expiresIn)) {
                throw new AccessTokenException('"expires_in" must be int');
            }
            if (0 >= $expiresIn) {
                throw new AccessTokenException('invalid "expires_in"');
            }
        }
        $this->expiresIn = $expiresIn;
    }
547239
public function set($key, $value, $expire = null)
    {
        if (null === $expire) {
            $expire = $this->_expire;
        }
        return $this->_mc->set($key, $value, 0, $expire);
    }
1267851
public function set($name, $value, $expire) {
        if (is_null($expire)) {
            $expire = $this->options['expire'];
        }
        $filename = $this->setCacheKey($name);

        $data = serialize($value);
        $data = "<?php\n//" . sprintf('%012d', $expire) . $data . "\n?>";
        file_put_contents($filename, $data);
    }
328757
public function set(int $value, int $expire = 0): bool
    {
        return parent::setString(strval($value), $expire);
    }
660432
public function set($name, $value, $expire = 0)
    {
        $cookie_name = $this->getName($name);
        $cookie_expire = time() + ($expire ? $expire : $this->_expire);
        $cookie_value = $this->pack($value, $cookie_expire);
        $cookie_value = $this->authcode($cookie_value, 'ENCODE', $this->_securekey);

        if ($cookie_name && $cookie_value && $cookie_expire) {
            setcookie($cookie_name, $cookie_value, $cookie_expire, '/');
        }

    }
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;
    }
224755
public function update($key, $value, $expire = 0)
    {
        $arr = $this->get($key);
        if (!empty($arr)) {
            $arr = array_merge($arr, $value);
            return $this->set($key, $arr, $expire);
        }
        return 0;
    }
698864
public function set($name, $value, $expire = null): bool
    {
        $this->writeTimes++;

        if (is_null($expire)) {
            $expire = $this->options['expire'];
        }

        if (!empty($this->tag) && !$this->has($name)) {
            $first = true;
        }

        $key    = $this->getCacheKey($name);
        $expire = $this->getExpireTime($expire);

        $value = $this->serialize($value);

        if ($expire) {
            $this->handler->setex($key, $expire, $value);
        } else {
            $this->handler->set($key, $value);
        }

        isset($first) && $this->setTagItem($key);

        return true;
    }
391
public static function set($key, $value, $expire = 0) {
        try {
            self::getCache()->set($key, $value, $expire);
            self::release();
        } catch (\RuntimeException $e) {
            self::release();
            throw $e;
        } catch (\Error $e) {
            self::release();
            throw $e;
        }
    }
362550
public static function set($name, $value, $expire = null){
        return self::driver()->set($name,$value,$expire);
    }
552600
public static function add( $key, $value, $expires )
	{
		$cache = self::instance();
		if ( $cache && $value != null) {
			$cache->set( $key, $value, $expires * 60 );
		}
	}
375897
public function memcacheSet($key, $value, $expiration = null)
    {
        if ($this->isSingle()) {
            MemcacheKit::set($key, $value, $expiration);
        }
    }
336474
public function setExpiry(int $expires = null):AccessToken{
		$now = time();

		if($expires!== null){
			$expires =  intval($expires);
		}

		$this->expires = self::EOL_UNKNOWN;

		if($expires === 0 || $expires === self::EOL_NEVER_EXPIRES){
			$this->expires = self::EOL_NEVER_EXPIRES;
		}
		elseif($expires > $now){
			$this->expires = $expires;
		}
		elseif($expires > 0 && $expires < self::EXPIRY_MAX){
			$this->expires = $now + $expires;
		}

		return $this;
	}
978956
public function setExpires($expires)
    {
        if (!$expires instanceof \DateTime) {
            // @see https://github.com/bshaffer/oauth2-server-bundle/issues/24
            $dateTime = new \DateTime();
            $dateTime->setTimestamp($expires);
            $expires = $dateTime;
        }

        $this->expires = $expires;

        return $this;
    }
1367166
public function storageLogin($key, $data, $expire = 0)
    {
        $key = $this->getKey($key);
        Session::set($key, $data);
    }
785723
public function setRaw(string $value, int $expire = 0): bool
    {
        return parent::setString($value, $expire);
    }
489211
public function expireAfter($key, $expire = 0)
    {
        $val = $this->mem->get($key);

        if (isset($val)) {
            return $this->set($key, $val, $expire);
        }

        return false;
    }