public function touch($key, $expire) { $ttl = $this->ttl($expire); if ($ttl < 0) { // Redis can't set expired, so just remove in that case ;) return (bool) $this->client->del($key); } return $this->client->expire($key, $ttl); }