static Long getTicketExpirationInSeconds(final Ticket ticket) {
        val ttl = ticket.getExpirationPolicy().getTimeToLive();
        if (ttl > Integer.MAX_VALUE) {
            return (long) Integer.MAX_VALUE;
        }
        return ttl <= 0 ? 1L : ttl;
    }
If no time out value is specified, expire the ticket immediately.

@param ticket the ticket
@return timeout
support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/key/RedisKeyGenerator.java