public function setDefaultSeconds($ttl): void
    {
        $type = gettype($ttl);
        switch ($type) {
            case "integer":
                $seconds = $ttl;
                break;
            case "object":
                if ($ttl instanceof \DateInterval) {
                    $seconds = $this->dateIntervalToSeconds($ttl);
                } else {
                    throw StrictTypeException::defaultTTL($ttl);
                }
                break;
            default:
                if (! $this->strictType) {
                    if (is_numeric($ttl)) {
                        $seconds = intval($ttl);
                    }
                }
        }
        if (! isset($seconds)) {
            throw StrictTypeException::defaultTTL($ttl);
        }
        if ($seconds < 0) {
            throw InvalidArgumentException::negativeDefaultTTL($seconds);
        }
        $this->defaultSeconds = $seconds;
    }