public function ttl($ttl = null)
    {
        if ($ttl === null) {
            return (int) $this->ttl;
        }

        if ($ttl instanceof \DateTime) {
            return $this->ttl = $ttl->format('U');
        }

        return $this->ttl = time() + (int) $ttl;
    }