Sets expiration time for cache keys

Parameters

  • string $key The key to uniquely identify the cached item
  • mixed $expiry A `strtotime()`-compatible string indicating when the cached item should expire, or a Unix timestamp.

Returns

boolean Returns `true` if expiry could be set for the given key, `false` otherwise.

Source

						protected function _ttl($key, $expiry) {
		return $this->connection->expireAt($key, is_int($expiry) ? $expiry : strtotime($expiry));
	}