public synchronized void releaseCache() {
        if (this.cache != null) {
            this.cache.release();
            this.cache = null;
        }
        this.cachePosition = -1;
    }
Release the cache if it is not null.
This method should be called when no more {@link #read}s will be called to release the allocated memory.
s3stream/src/main/java/com/automq/stream/s3/wal/util/WALCachedChannel.java