kvarn::comprash

Enum ServerCachePreference

source
pub enum ServerCachePreference {
    None,
    QueryMatters,
    Full,
    MaxAge(Duration),
}
Expand description

The preference for caching the item on the server.

This can be overridden by the cache-control or kvarn-cache-control headers.

Note: It’s only a preference. Disabling the cache in compile-time will disable this behaviour. Some other factors also play a role, such as number of cached Vary responses on a page.

Variants§

§

None

Will not cache response

§

QueryMatters

Will cache response with query

§

Full

Query does not matter and will be discarded

§

MaxAge(