CacheOptions
public struct CacheOptions
Cache configuration options for StaticFileServer.
-
Initialize a CacheOptions instance.
Declaration
Swift
public init(addLastModifiedHeader: Bool = true, maxAgeCacheControlHeader: Int = 0, generateETag: Bool = true)Parameters
addLastModifiedHeaderan indication whether to set “Last-Modified” header in the response.
maxAgeCacheControlHeadera max-age in seconds for “max-age” value in “Cache-Control” header in the response
generateETagan indication whether to set “Etag” header in the response.
View on GitHub
CacheOptions Structure Reference