@Override
    public long getMaxLifetime()
    {
        // The constructor asserts that the expireAfterWrite policy is present.
        return cache.policy().expireAfterWrite().get().getExpiresAfter( TimeUnit.MILLISECONDS );
    }
Returns the maximum number of milliseconds that any object can live
in cache. Once the specified number of milliseconds passes, the object
will be automatically expired from cache. If the max lifetime is set
to -1, then objects never expire.

@return the maximum number of milliseconds before objects are expired.
xmppserver/src/main/java/org/jivesoftware/util/cache/CaffeineCache.java