doyaaaaaaken
06/02/2022, 8:04 AMCachingHeader plugin](https://ktor.io/docs/caching.html), and CachingOptions (io.ktor.server.http.content) class shows compile errors because it became to need expires parameter (non nullable).
As I know, If we want to return Cache-Control: no-cache as http response, then expires header is not required.
Why is this parameter required?Aleksei Tirman [JB]
06/02/2022, 8:08 AMexpires parameter is nullable with a default null value in Ktor 2.0.2:
public data class CachingOptions(val cacheControl: CacheControl? = null, val expires: GMTDate? = null)
So I can write a code like this:
install(CachingHeaders) {
options { call, outgoingContent ->
CachingOptions(CacheControl.NoCache(CacheControl.Visibility.Public))
}
}doyaaaaaaken
06/02/2022, 8:19 AM