code: protected function handleTtl($key, $expireSetTs, $expireSec)
      {
          $ttl = $expireSetTs + $expireSec - time();
          if ($ttl <= 0) {
              $this->getClient()->delete($key);
              throw new KeyNotFoundException();
          }
  
          return $ttl;
      }
docs: If ttl is lesser or equals 0 delete key.
  
  @param string $key
  @param int $expireSetTs
  @param int $expireSec
  
  @return int ttl
  
  @throws KeyNotFoundException