Re: [httpbis] #432: Review Cachability of Status Codes WRT "Negative Caching"

Mark Nottingham <mnot@mnot.net> Fri, 22 February 2013 02:37 UTC

Return-Path: <ietf-http-wg-request@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 7212821E803D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 21 Feb 2013 18:37:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.482
X-Spam-Level:
X-Spam-Status: No, score=-9.482 tagged_above=-999 required=5 tests=[AWL=1.117, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BZzIACkJf7+h for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 21 Feb 2013 18:37:01 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 89DEA21E803C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 21 Feb 2013 18:37:01 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U8iSa-0002Xm-5T for ietf-http-wg-dist@listhub.w3.org; Fri, 22 Feb 2013 02:34:04 +0000
Resent-Date: Fri, 22 Feb 2013 02:34:04 +0000
Resent-Message-Id: <E1U8iSa-0002Xm-5T@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1U8iSM-0002WM-Vk for ietf-http-wg@listhub.w3.org; Fri, 22 Feb 2013 02:33:50 +0000
Received: from mxout-08.mxes.net ([216.86.168.183]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1U8iSL-0007YU-Ob for ietf-http-wg@w3.org; Fri, 22 Feb 2013 02:33:50 +0000
Received: from [192.168.1.80] (unknown [118.209.197.138]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id D8081509B5 for <ietf-http-wg@w3.org>; Thu, 21 Feb 2013 21:33:26 -0500 (EST)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <2B8C0176-F957-4B69-B264-99CF556BD858@mnot.net>
Date: Fri, 22 Feb 2013 13:33:22 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: <7EE2ACA6-6ECE-424A-AE8D-0D843FB90782@mnot.net>
References: <059.77033a1709a94099b974f5d7985e94b6@trac.tools.ietf.org> <1B168529-9ECB-4A4D-9EC2-190447DB6B72@mnot.net> <2B8C0176-F957-4B69-B264-99CF556BD858@mnot.net>
To: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
X-Mailer: Apple Mail (2.1499)
Received-SPF: pass client-ip=216.86.168.183; envelope-from=mnot@mnot.net; helo=mxout-08.mxes.net
X-W3C-Hub-Spam-Status: No, score=-3.3
X-W3C-Hub-Spam-Report: AWL=-3.283, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1U8iSL-0007YU-Ob 931ae4ef03083e6291d4b7404eed5576
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [httpbis] #432: Review Cachability of Status Codes WRT "Negative Caching"
Archived-At: <http://www.w3.org/mid/7EE2ACA6-6ECE-424A-AE8D-0D843FB90782@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16741
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>

OK, since there's been no more discussion, I'm going to go ahead and mark the following as cacheable:

	• 204 (No Content)
	• 404 (Not Found)
	• 405 (Method Not Allowed)
	• 414 (Request URI Too Long)
	• 501 (Not Implemented)

Cheers,



On 18/02/2013, at 11:12 AM, Mark Nottingham <mnot@mnot.net> wrote:

> I haven't seen any discussion, and this is our last ticket (at least for the moment).
> 
> So, I'll make a proposal; we should identify the following additional status codes as cacheable (i.e., eligible for using a heuristic to determine freshness, in the absence of explicit information);
> 
> 	• 204 (No Content)
> 	• 404 (Not Found)
> 	• 405 (Method Not Allowed)
> 	• 414 (Request URI Too Long)
> 	• 501 (Not Implemented)
> 	• 502 (Bad Gateway)
> 	• 503 (Service Unavailable)
> 	• 504 (Gateway Timeout)
> 
> Note that I'm *not* proposing the following, even though they are negatively cached by some implementations, as I suspect doing so may cause interop problems:
> 
> 	• 400 (Bad Request)
> 	• 403 (Forbidden)
> 	• 500 (Internal Server Error)
> 
> Thoughts?
> 
> 
> 
> On 11/02/2013, at 5:28 PM, Mark Nottingham <mnot@mnot.net> wrote:
> 
>> ... and this is the ticked I just promised:
>> 
>> Begin forwarded message:
>> 
>>> From: "httpbis" <trac+httpbis@trac.tools.ietf.org>
>>> Subject: [httpbis] #432: Review Cachability of Status Codes WRT "Negative Caching"
>>> Date: 11 February 2013 5:27:44 PM AEDT
>>> To: mnot@pobox.com
>>> Reply-To: ietf-http-wg@w3.org
>>> 
>>> #432: Review Cachability of Status Codes WRT "Negative Caching"
>>> ----------------------------+-----------------------------
>>> Reporter:  mnot@pobox.com  |      Owner:
>>>   Type:  design          |     Status:  new
>>> Priority:  normal          |  Milestone:  unassigned
>>> Component:  p6-cache        |   Severity:  In WG Last Call
>>> Keywords:                  |     Origin:  #223
>>> ----------------------------+-----------------------------
>>> Currently, the following status codes are defined as cacheable -- that is,
>>> able to be stored without any explicit freshness information:
>>> 
>>> - 200 (OK)
>>> - 203 (Non-Authoritative Information)
>>> - 206 (Partial Content)
>>> - 300 (Multiple Choices)
>>> - 301 (Moved Permanently)
>>> - 410 (Gone)
>>> 
>>> However, many caches store other status codes (often called "Negative
>>> Caching")
>>> 
>>> For example, both Squid and Traffic Server (which have considerable market
>>> share, and form the basis of many other implementations) negatively cache
>>> the following status codes:
>>> 
>>> - 204 (No Content)
>>> - 400 (Bad Request)
>>> - 403 (Forbidden)
>>> - 404 (Not Found)
>>> - 405 (Method Not Allowed)
>>> - 414 (Request URI Too Long)
>>> - 500 (Internal Server Error)
>>> - 501 (Not Implemented)
>>> - 502 (Bad Gateway)
>>> - 503 (Service Unavailable)
>>> - 504 (Gateway Timeout)
>>> 
>>> While some of these may be bad to cache by default (in particular, 400 and
>>> 500), others may make sense: for example, 204 seems straightforward, and
>>> 404 seems high-value.
>>> 
>>> The major concern here is making semantic changes to the protocol.
>>> 
>>> -- 
>>> Ticket URL: <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/432>
>>> httpbis <http://tools.ietf.org/wg/httpbis/>
>>> 
>> 
>> --
>> Mark Nottingham   http://www.mnot.net/
>> 
>> 
>> 
>> 
> 
> --
> Mark Nottingham   http://www.mnot.net/
> 
> 
> 
> 

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