Interface StaticFiles.CacheControlResolver
- Enclosing class:
StaticFiles
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptioncacheControlFor(@NonNull Path path, @NonNull BasicFileAttributes attributes) Resolves theCache-Controlvalue for the file being served.
-
Method Details
-
fromValue
-
disabledInstance
-
cacheControlFor
@NonNull Optional<String> cacheControlFor(@NonNull Path path, @NonNull BasicFileAttributes attributes) Resolves theCache-Controlvalue for the file being served.Implementations must be thread-safe;
StaticFilesinvokes resolvers concurrently from request-handling threads.- Parameters:
path- the resolved file path being servedattributes- the file attributes read for this response- Returns:
- the cache-control value to emit, or
Optional.empty()to omit it
-