static HttpFile ofCached(HttpFile file, int maxCachingLength) {
        requireNonNull(file, "file");
        checkArgument(maxCachingLength >= 0, "maxCachingLength: %s (expected: >= 0)", maxCachingLength);
        if (maxCachingLength == 0) {
            return file;
        } else {
            return new CachingHttpFile(file, maxCachingLength);
        }
    }
Creates a new {@link HttpFile} which caches the content and attributes of the specified {@link HttpFile}.
The cache is automatically invalidated when the {@link HttpFile} is updated.

@param file the {@link HttpFile} to cache
@param maxCachingLength the maximum allowed length of the {@link HttpFile} to cache. if the length of
                        the {@link HttpFile} exceeds this value, no caching will be performed.
core/src/main/java/com/linecorp/armeria/server/file/HttpFile.java