@param $expirationDate

@throws VideoItemException

@return $this
764703
public function setExpirationDate($expirationDate)
    {
        self::writeFullTag(
            $expirationDate,
            'expiration_date',
            true,
            'video:expiration_date',
            $this->validator,
            'validateExpirationDate',
            $this->exception,
            'Provided expiration date value is not a valid.'
        );

        return $this;
    }
1314341
public function setExpirationYear($expirationYear)
    {
        if ($expirationYear !== null) {
            $expirationYear = $expirationYear < 100 ? 2000 + $expirationYear : $expirationYear;
        }
        $this->expirationYear = $expirationYear;

        return $this;
    }
1038807
public function temporary($sceneId, $expireSeconds = null)
    {
        $scene = ['scene_id' => intval($sceneId)];

        return $this->create(self::SCENE_QR_TEMPORARY, $scene, true, $expireSeconds);
    }
1079189
public function set($key, $value, $expiration = false)
    {
        $path = $this->filename($key);
        $umask = umask($this->umask);
        file_put_contents($path, $this->createValue($value, $expiration));
        umask($umask);
        return $this;
    }
1131808
public function prune($video = null)
    {
        if ($video) {
            $this->addUsingAlias(VideoTableMap::COL_ID, $video->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
786072
public function setExpire($expire)
    {
        // Convert expiration time to a Unix timestamp
        if ($expire instanceof DateTime) {
            $expire = $expire->format('U');
        }

        if (!is_numeric($expire))
        {
            $expire = strtotime($expire);

            if ($expire === false || $expire === -1) {
                throw new InvalidArgumentException('The cookie expiration time is not valid.');
            }
        }

        $this->_expire = $expire;
        return $this;
    }
1045763
public function generate($videoId, $ipRestriction = 0, $expiration = null)
    {
        $expiration = !is_null($expiration)
            ? $expiration
            : $this->defaultExpiration;

        $expirationTime = time() + $expiration;

        return $expirationTime.
            '_'.$ipRestriction.
            '_'.md5($this->signingKey.
            '_'.$videoId.
            '_'.$expirationTime.
            '_'.$ipRestriction);
    }
1321324
public function setCacheItemPool($cacheItemPool)
    {
        $this->cacheItemPool = $cacheItemPool;

        if (null === $this->expiration) {
            $this->expiresAfter($this->getCacheItemPool()->getPoolDefaultTTL());
        }

        return $this;
    }
586689
public function add($key, $value, $expiration = 0)
    {
        return $this->memcached ? $this->memcached->add($key, $value, $expiration) : false;
    }
1330307
public function store($key, $data, $expiration = 0) {
    $storeData = array(
      'time'   => time(),
      'expire' => $expiration,
      'data'   => serialize($data)
    );
    $dataArray = $this->_loadCache();
    if (true === is_array($dataArray)) {
      $dataArray[$key] = $storeData;
    } else {
      $dataArray = array($key => $storeData);
    }
    $cacheData = json_encode($dataArray);
    file_put_contents($this->getCacheDir(), $cacheData);
    return $this;
  }
547239
public function set($key, $value, $expire = null)
    {
        if (null === $expire) {
            $expire = $this->_expire;
        }
        return $this->_mc->set($key, $value, 0, $expire);
    }
1120372
public function expire()
    {
        if ($this->isFresh()) {
            $this->headers->set('Age', $this->getMaxAge());
            $this->headers->remove('Expires');
        }

        return $this;
    }
372851
public function withExpires(DateTime $date)
    {
        $timezone = new DateTimeZone("PRC");

        $this->withoutHeader('Expires');
        $date->setTimezone($timezone);
        $this->withHeader('Expires', $date->format('D, d M Y H:i:s') . ' GMT');

        $maxAge = $date->getTimestamp() - (new DateTime('now', $timezone))->getTimestamp();
        $this->withMaxAge($maxAge);

        return $this;
    }
259490
public function set($key, $value, $expiration = 0)
    {
        $key = $this->createKey($key);
        $this->instance->set($key, $value, $expiration);
        return $this;
    }
727608
public function setExpirationInterval($expiration_interval)
    {
        $allowedValues = $this->getExpirationIntervalAllowableValues();
        if (!is_null($expiration_interval) && !in_array($expiration_interval, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'expiration_interval', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['expiration_interval'] = $expiration_interval;

        return $this;
    }
1190644
public function expire($expire)
    {
        if (is_null($expire)) {
            $this->expire = null;
        } elseif (is_numeric($expire) || $expire instanceof DateInterval) {
            $this->expiresAfter($expire);
        } elseif ($expire instanceof DateTimeInterface) {
            $this->expire = $expire;
        } else {
            throw new InvalidArgumentException('not support datetime');
        }

        return $this;
    }
1344811
public function cache($key, $expires = null) {
        if ($this->getType() !== self::SELECT) {
            return $this;
        }

        $this->_cacheKey = $key;
        $this->_cacheLength = $expires;

        return $this;
    }