You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Norm Paxton (JIRA)" <ji...@apache.org> on 2014/05/20 17:30:39 UTC

[jira] [Commented] (TS-2591) Cache does not invalidate variant/alternate content types on PUT or POST

    [ https://issues.apache.org/jira/browse/TS-2591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003446#comment-14003446 ] 

Norm Paxton commented on TS-2591:
---------------------------------

Additional information:
The expected behavior for this use case is less ambiguous in the new draft spec:
http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-4.3.4

   Responses to the PUT method are not cacheable.  If a successful PUT
   request passes through a cache that has one or more stored responses
   for the effective request URI, those stored responses will be
   invalidated (see Section 4.4 of [Part6]).

Also please consider the use-case where one media-type (ie 'application/xml') is already in the cache, but a PUT is with a media-type (ie, 'application/json') that is NOT found in the cache, I would still expect it to invalidate the 'application/xml' variant.

> Cache does not invalidate variant/alternate content types on PUT or POST 
> -------------------------------------------------------------------------
>
>                 Key: TS-2591
>                 URL: https://issues.apache.org/jira/browse/TS-2591
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>            Reporter: Norm Paxton
>            Assignee: Leif Hedstrom
>             Fix For: 5.0.0
>
>
> "Some HTTP methods MUST cause a cache to invalidate an entity. This is either the entity referred to by the Request-URI, or by the Location or Content-Location headers (if present). These methods are: PUT, DELETE, POST." 
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.10 
> (This doesn't explicitly address variant content types, I read it as implied.)
> The current caching implementation only invalidates the Request URI, and not variant/alternate URI's.
> Example:  A REST service provides both xml and json documents.  A client app requests in both content-types (perhaps two different components, one expects xml, the other json).  Assume both documents (xml and json) are in the cache.  If the app PUTs a modification to the object in XML (ie, changes a User object's email address), it should then be able to retrieve the correct object data via a GET in json.  In order to do so, the json object in the cache would need to be invalidated, so that the cache server forwards the request on to the REST service.



--
This message was sent by Atlassian JIRA
(v6.2#6252)