TimestampOffset tryGetEntryFromCache(int n) {
        Optional<ByteBuf> rst = cache.get(cacheId, (long) n * ENTRY_SIZE, ENTRY_SIZE);
        if (rst.isPresent()) {
            ByteBuf buffer = rst.get();
            return new TimestampOffset(buffer.readLong(), baseOffset() + buffer.readInt());
        } else {
            return TimestampOffset.UNKNOWN;
        }
    }
In the case of unclean shutdown, the last entry needs to be recovered from the time index.
core/src/main/scala/kafka/log/streamaspect/ElasticTimeIndex.java