<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Default Sans Serif";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Excellent I understand and agree with what you are saying. Is this behaviour documented within the Squid documentation anywhere, or is this more ¡¥how does the HTTP specification
 handle caching¡¦?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">I am moving forward with a HTTP GET to see if that works per my use case. I assume therefore that any other verb is simply not going to work out the box?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Default Sans Serif"">Kind regards,<br>
<br>
Andy Armstrong </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"MS Mincho"">¦w­}</span><span style="font-family:"Default Sans Serif"">
</span><span style="font-family:"MS Mincho"">ªü©i´µ¯S®Ô</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Default Sans Serif"">Principal Specialist for Z Technologies</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Default Sans Serif"">EMEA Squad Leader for Hybrid Cloud<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Default Sans Serif"">Worldwide Community Leader for Hybrid Cloud<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Default Sans Serif"">Member of the CTO Office Server & Storage EMEA<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Default Sans Serif"">Distinguished Technical Specialist ¡V The Open Group</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Default Sans Serif"">IBM Master Inventor<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><br>
</span><span style="font-family:"Default Sans Serif"">Mobile: +447500103874</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">squid-users <squid-users-bounces@lists.squid-cache.org> on behalf of Amos Jeffries <squid3@treenet.co.nz><br>
<b>Date: </b>Thursday, 29 September 2022 at 13:06<br>
<b>To: </b>squid-users@lists.squid-cache.org <squid-users@lists.squid-cache.org><br>
<b>Subject: </b>[EXTERNAL] Re: [squid-users] TCP_MISS only<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">On 28/09/22 07:56, Andy Armstrong wrote:<br>
> Okay ¡V but what happens if you are communicating with a non REST <br>
> endpoint.<br>
<br>
You are still communicating over HTTP. To interact with and benefit from <br>
HTTP agents like caches you need to comply to the HTTP semantics they use.<br>
<br>
IMO, REST is just a useful tool to define (in abstract) an API's <br>
operation when considering what/how it needs to be implemented.<br>
<br>
<br>
> Consider a Web services endpoint for example where a request <br>
> is only interacted with via POST but the operation for example may <br>
> frequently be a read based function akin to a HTTP GET?<br>
<br>
That is by definition a broken implementation of HTTP. The agent is <br>
using a *delivery* API (POST) for retrieval (GET).<br>
<br>
If you can separate the delivery and fetch operations HTTP becomes much <br>
easier to use.<br>
<br>
<br>
> Is Squid just <br>
> simply not going to help cache those requests?<br>
<br>
Not *by default*, no.<br>
<br>
POST implies changing some arbitrary resource *other* than the URL <br>
presented. Based on data and logic which may not be provided in the <br>
request message URL+headers.<br>
<br>
To use POST with caching both the client *and* the server have to <br>
explicitly tell the HTTP cache agent(s) what to do on every single HTTP <br>
message.<br>
<br>
  - The client has to tell the cache whether a stored response is able <br>
to be produced as reply, what object-ID it is trying to retrieve, what <br>
object-ID's it already knows about (if any), and how old the stored <br>
object is allowed to be.<br>
<br>
  - The server has to tell the cache whether the response can be stored, <br>
what to use for a unique-ID of the reply object, how old it already is, <br>
how long it can be stored for, how and when to update it when it becomes <br>
stale.<br>
<br>
The Squid refresh_pattern can provide defaults for the storage times <br>
when they are omitted. But all the ID related things and whether to use <br>
cache at all can only come from the client/server.<br>
<br>
<br>
As you can see by limiting yourself to POST-only you have imposed a huge <br>
amount of complexity. Using GET instead for fetches makes all the above <br>
*optional* where now it is mandatory.<br>
<br>
<br>
> It is only helpful for <br>
> more strict alignment to REST principles?<br>
> <br>
<br>
You lost me here. Squid implements HTTP.<br>
<br>
REST is a very abstract simplification of basic HTTP/1.0 semantics. So <br>
the closer ones code aligns to REST the *easier* it is to implement HTTP <br>
properly. But HTTP/1.1+ are vastly more than REST.<br>
<br>
HTH<br>
Amos<br>
_______________________________________________<br>
squid-users mailing list<br>
squid-users@lists.squid-cache.org<br>
<a href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a> 
<o:p></o:p></span></p>
</div>
</div>

<DIV>
Unless otherwise stated above:<BR>
<BR>
IBM United Kingdom Limited<BR>
Registered in England and Wales with number 741598<BR>
Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU<BR>
</DIV></body>
</html>