Constructor

Plugin

new Plugin(config)

To construct a new cacheable response Plugin instance you must provide at least one of the config properties.

If both statuses and headers are specified, then both conditions must be met for the Response to be considered cacheable.

Parameter

config

Object

Values in config have the following properties:

Parameter

statuses

Optional

Array of number

One or more status codes that a Response can have and be considered cacheable.

headers

Optional

Object with string properties

A mapping of header names and expected values that a Response can have and be considered cacheable. If multiple headers are provided, only one needs to be present.