Subject: Re: [core] draft-ietf-core-coap-09 - Editorial comments WGLC

From: Klaus Hartke <[email-masked]>
Date: Tue, 1 May 2012 11:58:45 +0200

Esko Dijk wrote:
> * Section 5.10.8
>
>    “If a response with one or more Location-Path and/or Location-Query
>    Options passes through a cache and the implied URI identifies one or
>    more currently stored responses, those entries SHOULD be marked as
>    not fresh.”
>
> This feels like optimizing for a case that almost never happens (I may be
> wrong here).
>
> These are only used to indicate a new resource created. Typically a new
> resource would not be cached anywhere, so why do implementations need to
> expend effort to check this?

This is because error responses are cacheable. For example, if you have

    C: GET <coap://example.org/sensor1>
    S: 4.04 Not found
    C: POST <coap://example.org/setup?device=sensor1>
    S: 2.01 Created <coap://example.org/sensor1>

then it makes sense to invalidate the stored 4.04 (Not found)
response, so a subsequent GET request isn't satisfied from the cache.

Klaus