Structure
FileMiddleware.CachePolicy
The browser cache policy files should be served with.
struct CachePolicy
Topics
Type Properties
static let browserDefault: FileMiddleware.CachePolicyThe browser’s default caching policy should be used.static let noCache: FileMiddleware.CachePolicyThe browser will always ask before requesting the full file.
Type Methods
static func cache(upTo: Duration) -> CachePolicyThe browser will cache the file for the specified duration.static func custom(cacheControlHeader: HTTPFields.CacheControl?, ageHeader: Int?) -> CachePolicyA custom cache control policy that should be used for all files.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype