< draft-ietf-httpbis-targeted-cache-control-02.txt   draft-ietf-httpbis-targeted-cache-control-03.txt >
HTTP S. Ludin HTTP S. Ludin
Internet-Draft Akamai Internet-Draft Akamai
Intended status: Standards Track M. Nottingham Intended status: Standards Track M. Nottingham
Expires: 17 April 2022 Fastly Expires: 8 July 2022 Fastly
Y. Wu Y. Wu
Cloudflare Cloudflare
14 October 2021 4 January 2022
Targeted HTTP Cache Control Targeted HTTP Cache Control
draft-ietf-httpbis-targeted-cache-control-02 draft-ietf-httpbis-targeted-cache-control-03
Abstract Abstract
This specification defines a convention for HTTP response header This specification defines a convention for HTTP response header
fields that allow cache directives to be targeted at specific caches fields that allow cache directives to be targeted at specific caches
or classes of caches. It also defines one such header field, or classes of caches. It also defines one such header field,
targeted at Content Delivery Network (CDN) caches. targeted at Content Delivery Network (CDN) caches.
Note to Readers About This Document
_RFC EDITOR: please remove this section before publication_ This note is to be removed before publishing as an RFC.
The issues list for this draft can be found at Status information for this document may be found at
https://github.com/httpwg/http-extensions/labels/targeted-cc https://datatracker.ietf.org/doc/draft-ietf-httpbis-targeted-cache-
(https://github.com/httpwg/http-extensions/labels/targeted-cc). control/.
The most recent (often, unpublished) draft is at https://httpwg.org/ Discussion of this document takes place on the HTTP Working Group
http-extensions/draft-ietf-httpbis-targeted-cache-control.html mailing list (mailto:ietf-http-wg@w3.org), which is archived at
(https://httpwg.org/http-extensions/draft-ietf-httpbis-targeted- https://lists.w3.org/Archives/Public/ietf-http-wg/. Working Group
cache-control.html). information can be found at https://httpwg.org/.
See also the draft's current status in the IETF datatracker, at Source for this draft and an issue tracker can be found at
https://datatracker.ietf.org/doc/draft-ietf-httpbis-targeted-cache- https://github.com/httpwg/http-extensions/labels/targeted-cc.
control/ (https://datatracker.ietf.org/doc/draft-ietf-httpbis-
targeted-cache-control/).
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 17 April 2022. This Internet-Draft will expire on 8 July 2022.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text extracted from this document must include Revised BSD License text as
as described in Section 4.e of the Trust Legal Provisions and are described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Revised BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3
2. Targeted Cache-Control Header Fields . . . . . . . . . . . . 3 2. Targeted Cache-Control Header Fields . . . . . . . . . . . . 3
2.1. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2. Cache Behavior . . . . . . . . . . . . . . . . . . . . . 4 2.2. Cache Behavior . . . . . . . . . . . . . . . . . . . . . 5
2.3. Interaction with HTTP Freshness . . . . . . . . . . . . . 6 2.3. Interaction with HTTP Freshness . . . . . . . . . . . . . 6
2.4. Defining Targeted Fields . . . . . . . . . . . . . . . . 6 2.4. Defining Targeted Fields . . . . . . . . . . . . . . . . 7
3. The CDN-Cache-Control Targeted Field . . . . . . . . . . . . 7 3. The CDN-Cache-Control Targeted Field . . . . . . . . . . . . 7
3.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 7
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
6.1. Normative References . . . . . . . . . . . . . . . . . . 8 6.1. Normative References . . . . . . . . . . . . . . . . . . 8
6.2. Informative References . . . . . . . . . . . . . . . . . 9 6.2. Informative References . . . . . . . . . . . . . . . . . 9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
skipping to change at page 3, line 52 skipping to change at page 4, line 10
CDN-Cache-Control: max-age=60 CDN-Cache-Control: max-age=60
is a targeted field that applies to Content Delivery Networks (CDNs), is a targeted field that applies to Content Delivery Networks (CDNs),
as defined in Section 3. as defined in Section 3.
2.1. Syntax 2.1. Syntax
Targeted fields are Dictionary Structured Fields (Section 3.2 of Targeted fields are Dictionary Structured Fields (Section 3.2 of
[STRUCTURED-FIELDS]). Each member of the dictionary is a cache [STRUCTURED-FIELDS]). Each member of the dictionary is a cache
response directive from the Hypertext Transfer Protocol (HTTP) Cache response directive from the Hypertext Transfer Protocol (HTTP) Cache
Directive Registry. Directive Registry (https://www.iana.org/assignments/http-cache-
directives/). Note that while targeted fields often have the same
syntax as Cache-Control fields, differences in error handling mean
that using a Cache-Control parser rather than a Structured Fields
parser can introduce interoperability issues.
Because cache directives are not defined in terms of structured data Because cache directives are not defined in terms of structured data
types, it is necessary to map their values into the appropriate types, it is necessary to map their values into the appropriate
types. Section 5.2 of [HTTP-CACHING] defines cache directive values types. Section 5.2 of [HTTP-CACHING] defines cache directive values
to be either absent, a quoted-string, or a token. to be either absent, a quoted-string, or a token.
This means that cache directives that have no value will be mapped to This means that cache directives that have no value will be mapped to
a Boolean (Section 3.3.6 of [STRUCTURED-FIELDS]). When the value is a Boolean (Section 3.3.6 of [STRUCTURED-FIELDS]). When the value is
a quoted-string, it will be mapped to a String (Section 3.3.3 of a quoted-string, it will be mapped to a String (Section 3.3.3 of
[STRUCTURED-FIELDS]), and when it is a token, it will map to a Token [STRUCTURED-FIELDS]), and when it is a token, it will map to a Token
skipping to change at page 4, line 46 skipping to change at page 5, line 12
Parameters received on directives are to be ignored, unless other Parameters received on directives are to be ignored, unless other
handling is explicitly specified. handling is explicitly specified.
If a targeted field in a given response is empty, or a parsing error If a targeted field in a given response is empty, or a parsing error
is encountered, that field MUST be ignored by the cache (i.e., it is encountered, that field MUST be ignored by the cache (i.e., it
behaves as if the field were not present, likely falling back to behaves as if the field were not present, likely falling back to
other cache control mechanisms present). other cache control mechanisms present).
2.2. Cache Behavior 2.2. Cache Behavior
A cache that implement this specification maintains a _target list_ - A cache that implements this specification maintains a _target list_
an ordered list of the targeted field names that it uses for caching - an ordered list of the targeted field names that it uses for
policy, with the order reflecting priority from most applicable to caching policy, with the order reflecting priority from most
least. The target list might be fixed, user-configurable, or applicable to least. The target list might be fixed, user-
generated per request, depending upon the implementation. configurable, or generated per request, depending upon the
implementation.
For example, a CDN cache might support both CDN-Cache-Control and a For example, a CDN cache might support both CDN-Cache-Control and a
header specific to that CDN, ExampleCDN-Cache-Control, with the header specific to that CDN, ExampleCDN-Cache-Control, with the
latter overriding the former. Its target list would be: latter overriding the former. Its target list would be:
[ExampleCDN-Cache-Control, CDN-Cache-Control] [ExampleCDN-Cache-Control, CDN-Cache-Control]
When a cache that implements this specification receives a response When a cache that implements this specification receives a response
with one or more of of the header field names on its target list, the with one or more of of the header field names on its target list, the
cache MUST select the first (in target list order) field with a cache MUST select the first (in target list order) field with a
skipping to change at page 6, line 47 skipping to change at page 7, line 9
any Cache-Control: max-age value any Cache-Control: max-age value
This specification does not place any specific requirements on This specification does not place any specific requirements on
implementations to mitigate these effects, but definitions of implementations to mitigate these effects, but definitions of
targeted fields can do so. targeted fields can do so.
2.4. Defining Targeted Fields 2.4. Defining Targeted Fields
A targeted field for a particular class of cache can be defined by A targeted field for a particular class of cache can be defined by
requesting registration in the Hypertext Transfer Protocol (HTTP) requesting registration in the Hypertext Transfer Protocol (HTTP)
Field Name Registry https://www.iana.org/assignments/http-fields/ Field Name Registry (https://www.iana.org/assignments/http-fields/).
(https://www.iana.org/assignments/http-fields/), listing this
specification as the specification document. The Comments field of Registration requests can use this document as the specification
the registration should clearly define the class of caches that the document, in which case the Comments field should clearly define the
targeted field applies to. class of caches that the targeted field applies to. Alternatively,
if other documentation for the field has been created, it can be used
as the specification document.
By convention, targeted fields have the suffix "-Cache-Control": By convention, targeted fields have the suffix "-Cache-Control":
e.g., "ExampleCDN-Cache-Control". However, this suffix MUST NOT be e.g., "ExampleCDN-Cache-Control". However, this suffix MUST NOT be
used on its own to identify targeted fields; it is only a convention. used on its own to identify targeted fields; it is only a convention.
3. The CDN-Cache-Control Targeted Field 3. The CDN-Cache-Control Targeted Field
The CDN-Cache-Control response header field is a targeted field The CDN-Cache-Control response header field is a targeted field
(Section 2) that allows origin servers to control the behaviour of (Section 2) that allows origin servers to control the behaviour of
CDN caches interposed between them and clients, separately from other CDN caches interposed between them and clients, separately from other
skipping to change at page 7, line 28 skipping to change at page 7, line 40
Delivery Network or CDN). Delivery Network or CDN).
CDN caches that use CDN-Cache-Control will typically forward this CDN caches that use CDN-Cache-Control will typically forward this
header so that downstream CDN caches can use it as well. However, header so that downstream CDN caches can use it as well. However,
they MAY remove it when this is undesirable (for example, when they MAY remove it when this is undesirable (for example, when
configured to do so because it is known not to be used downstream). configured to do so because it is known not to be used downstream).
3.1. Examples 3.1. Examples
For example, the following header fields would instruct a CDN cache For example, the following header fields would instruct a CDN cache
to consider the response fresh for 600 seconds, other shared caches (i.e., a cache with a target list of \[CDN-Cache-Control]]) to
for 120 seconds and any remaining caches for 60 seconds: consider the response fresh for 600 seconds, other shared caches for
120 seconds and any remaining caches for 60 seconds:
Cache-Control: max-age=60, s-maxage=120 Cache-Control: max-age=60, s-maxage=120
CDN-Cache-Control: max-age=600 CDN-Cache-Control: max-age=600
These header fields would instruct a CDN cache to consider the These header fields would instruct a CDN cache to consider the
response fresh for 600 seconds, while all other caches would be response fresh for 600 seconds, while all other caches would be
prevented from storing it: prevented from storing it:
CDN-Cache-Control: max-age=600 CDN-Cache-Control: max-age=600
Cache-Control: no-store Cache-Control: no-store
 End of changes. 17 change blocks. 
37 lines changed or deleted 43 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/