CachingHeaders

class CachingHeaders

Feature that set CachingOptions headers for every response. It invokes optionsProviders for every response and use first non null caching options

Types

Configuration

class Configuration

Configuration for CachingHeaders feature

Feature

ApplicationFeature implementation for ConditionalHeaders

Constructors

<init>

CachingHeaders(
    optionsProviders: List<(OutgoingContent) -> CachingOptions?>)

Feature that set CachingOptions headers for every response. It invokes optionsProviders for every response and use first non null caching options

Functions

optionsFor

fun optionsFor(
    content: OutgoingContent
): List<CachingOptions>

Retrieves caching options for a given content

Companion Object Properties

key

Unique key that identifies a feature

Companion Object Functions

install

fun install(
    pipeline: ApplicationCallPipeline,
    configure: Configuration.() -> Unit
): CachingHeaders

Feature installation script