expire
@param  string $key [@todo description]
@param  integer $seconds [@todo description]
@param  callable $cb [@todo description]
@callback $cb ( )
@return void
7413
public function expire($key, $seconds, $cb = null)
    {
        $this->redis->expire($this->config->redisprefix->value . $key, $seconds, $cb);
    }
385842
public function touch($key, $expiration = null) {

		if(false === is_string($key) && false === is_array($key)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string or array, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
   		}

   		if(0 === strlen($key)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() may not be an empty string', __METHOD__), E_USER_ERROR);
   		}

		if(true === $this -> exists($key)) {

			$info = apcu_cache_info();

			if(true === is_array($info) && true === isset($info['cache_list'])) {

				foreach($info['cache_list'] as $index) {

					if(true === isset($index['info'], $index['ttl']) && $index['info'] === $key) {

						$data 		= $this -> get($key);
						$expiration = $index['ttl'];

						$this -> expire($key);
						$this -> set($key, $data, $expiration);
						break;
					}
				}
			}
		}

		return $this;
	}
1272823
protected function set($key, $data, $expire) {
		$this->memcache->set($key, $data, null, $expire);
	}
294730
public static function expires($cacheloc, $cachekey)
    {
        $cacheloc = "cache_" . $cacheloc;
        if ( isset($_SESSION[$cacheloc]) ) {
            $cache_row = $_SESSION[$cacheloc];
            if ( time() >= $cache_row[2] ) { 
                unset($_SESSION[$cacheloc]);
                return false;
            }
            if ( $cache_row[0] != $cachekey ) return false;
            if ( $cache_row[0] === false ) return false;
            return $cache_row[2] - time();
        }
        return false;
    }
71245
public static function saveCache(string $key, $value, int $seconds = 0): bool
    {
        return self::getInstance()->save($key, $value, $seconds);
    }
1120058
public function expiration($key)
	{
		if (isset($this->data[static::EXPIRE_DATA_KEY][$key]))
		{
			$expiration = array(
				$this->data[static::EXPIRE_DATA_KEY][$key][0] == EXPIRE_ON_REQUEST ? 'EXPIRE_ON_REQUEST' : 'EXPIRE_ON_GET',
				$this->data[static::EXPIRE_DATA_KEY][$key][1] == static::EXPIRE_STATE_NEW ? 'STATE_NEW' : ($this->data[static::EXPIRE_DATA_KEY][$key][1] == static::EXPIRE_STATE_LOADED ? 'STATE_LOADED' : 'STATE_EXPIRED'),
			);
			return $expiration;
		}

		return false;
	}
862923
private static function saveCredentials($key, $credentials)
    {
        $ttl = ($credentials->expires_in / 60) - 2;

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

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

        return $this;
    }
353586
public function expireat($key, $timestamp)
    {
        $this->init();
        $result = $this->driver->expireat($key, $timestamp);
        return (bool)$result;
    }
1303282
public void setExpires(int seconds) {
		try {
			ExpiresHeader expiresHeader =
				SipFactoryImpl.headerFactory.createExpiresHeader(seconds);
			expiresHeader.setExpires(seconds);
			this.message.setExpires(expiresHeader);
		} catch (Exception e) {
			throw new IllegalArgumentException("Error setting expiration header!", e);
		}
	}
1091347
public function expire(Memento\Key $key = null)
    {
        $this->__connect($key);
        $expiresKey = $this->groupKey ? $this->groupKey : $key;
        $this->redis->hset($expiresKey->getKey(), Memento\Hash::FIELD_EXPIRES, 0);

        return (0 === intval($this->redis->hget($expiresKey->getKey(), Memento\Hash::FIELD_EXPIRES)));
    }
176491
public function save(string $key, $value, int $seconds = 0): bool
    {
        if (empty($key)) {
            throw  new \ErrorException('"key" should not be empty!');
        } elseif (!$this->isEnable()) {
            return false;
        }

        $data = $this->read();
        if (!is_array($data)) {
            $data = array();
        }

        $data[$key] = $value;

        return parent::write($data, $seconds ? $seconds : $this->timeout);
    }
728020
public function set($key, $response, $seconds)
	{
		return $this->memcached->set($key, $response, $seconds);
	}
67114
public function expiration($key)
    {
        if ($this->exists($name)) {
            $data = Query::from($this->table)
                        ->where('name', '=', $name)
                        ->first();

            if ($data->lifetime >= time()) {
                return $data->lifetime;
            }
        }
    }
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);
        }
    }
485943
public function touch($key, $expiration = null) {

    	if(null !== $expiration && false === ('-' . intval($expiration) == '-' . $expiration)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($expiration)), E_USER_ERROR);
		}

		$this -> call() -> touch($key, $expiration);
		return $this;
    }
1183084
public function remember($key, $minutes, Closure $callback)
    {
        return $this->cache->remember($key, $minutes, $callback);
    }