Re: Server Push and Caching

Mark Nottingham <mnot@mnot.net> Thu, 08 September 2016 00:12 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6A73E12B0D7 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 7 Sep 2016 17:12:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.429
X-Spam-Level:
X-Spam-Status: No, score=-8.429 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.508, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t9xjCeYnkd3s for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 7 Sep 2016 17:12:08 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2D6F812B0A7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 7 Sep 2016 17:12:08 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bhmsL-0001fv-J3 for ietf-http-wg-dist@listhub.w3.org; Thu, 08 Sep 2016 00:07:29 +0000
Resent-Date: Thu, 08 Sep 2016 00:07:29 +0000
Resent-Message-Id: <E1bhmsL-0001fv-J3@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <mnot@mnot.net>) id 1bhms9-0001eQ-Rb for ietf-http-wg@listhub.w3.org; Thu, 08 Sep 2016 00:07:17 +0000
Received: from mxout-07.mxes.net ([216.86.168.182]) by lisa.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <mnot@mnot.net>) id 1bhmru-0003kG-0V for ietf-http-wg@w3.org; Thu, 08 Sep 2016 00:07:11 +0000
Received: from [192.168.3.104] (unknown [124.189.98.244]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 29B4522E1F3; Wed, 7 Sep 2016 20:06:37 -0400 (EDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <57026FC8-C02C-46A1-97B1-B166CEB4D7C3@gbiv.com>
Date: Thu, 8 Sep 2016 10:06:35 +1000
Cc: Tom Bergan <tombergan@chromium.org>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <E1890F7D-5769-4315-9467-33BCC602D628@mnot.net>
References: <3904FEC0-4362-47A0-886A-B97FB97E2515@mnot.net> <CA+3+x5F+KVMvfDu=+H0-ScqiYbGL5RPcF9wfZ5992Q=xcp1k8A@mail.gmail.com> <B42CD662-950E-4D91-AE73-29AFEE584E49@gbiv.com> <8D8D93DF-19A7-4C1F-AC6E-F8FD9213A2D8@mnot.net> <57026FC8-C02C-46A1-97B1-B166CEB4D7C3@gbiv.com>
To: Roy Fielding <fielding@gbiv.com>
X-Mailer: Apple Mail (2.3124)
Received-SPF: pass client-ip=216.86.168.182; envelope-from=mnot@mnot.net; helo=mxout-07.mxes.net
X-W3C-Hub-Spam-Status: No, score=-8.3
X-W3C-Hub-Spam-Report: AWL=1.351, BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1bhmru-0003kG-0V 56cf9343d41ba5983fb7ec4d044b581e
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Server Push and Caching
Archived-At: <http://www.w3.org/mid/E1890F7D-5769-4315-9467-33BCC602D628@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32387
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

> On 8 Sep 2016, at 3:22 AM, Roy T. Fielding <fielding@gbiv.com> wrote:

>>>> Note that HTTP does not put constraints on _how_ the application uses that response after it comes through the API or the cache; it might use it multiple times (e.g., an image might occur more than once on a page, or more than one downstream client might have made the request). It's just that this reuse isn't in the context of a HTTP cache's operation.
>> 
>> You're correct that an HTTP *client* isn't required to revalidate a response, but a cache is.
> 
> A cache isn't required to revalidate.  Only a client revalidates, and only
> when it wants to do so.  A cache never makes requests.  A cache is only required
> to mark the response as stale.

From previous discussions, I know that's your view, and I think it's internally consistent. I'm less convinced that view is shared by implementations, or even the specs.

RFC 7234, Section 4: "A cache that does not have a clock available MUST NOT use stored responses without revalidating them upon every use."

Section 4.2.4: "A cache MUST NOT generate a stale response if it is prohibited by an explicit in-protocol directive (e.g., by a "no-store" or "no-cache" cache directive, a "must-revalidate" cache-response-directive, or an applicable "s-maxage" or "proxy-revalidate" cache-response-directive; see Section 5.2.2)."

Section 4.3.2: "When a cache decides to revalidate its own stored responses for a request..."

Section 5.2.2.1: "The "must-revalidate" response directive indicates that once it has become stale, a cache MUST NOT use the response to satisfy subsequent requests without successful validation on the origin server."

Section 5.5.2:" A cache SHOULD generate this when sending a stale response because an attempt to validate the response failed, due to an inability to reach the server."

2616 contains much the same language.

Cheers,

--
Mark Nottingham   https://www.mnot.net/