Didn't make the #ChromeDevSummit this year? Catch all the content (and more!) in the Chrome Dev Summit 2019 playlist on our Chrome Developers YouTube Channel.

Class: Plugin

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.