So, perhaps header_rewrite and cachekey... use header_rewrite to put the method 
in an internal header; then use cachekey to use that header in the 
cachekey?Header Rewrite Plugin — Apache Traffic Server 6.2.0 documentation

|   |
|   |   |   |   |   |
| Header Rewrite Plugin — Apache Traffic Server 6.2.0 documentationHeader 
Rewrite Plugin This plugin allows you to modify arbitrary headers based on 
defined rules, forboth requests and responses. Purpose  |
|  |
| View on docs.trafficserver.apache.org | Preview by Yahoo |
|  |
|   |

Cache Key Manipulation Plugin — Apache Traffic Server 6.2.0 documentation

|   |
|   |   |   |   |   |
| Cache Key Manipulation Plugin — Apache Traffic Server 6.2.0 
documentationCache Key Manipulation Plugin Description This plugin allows some 
common cache key manipulations based on various HTTP request components. It can 
 |
|  |
| View on docs.trafficserver.apache.org | Preview by Yahoo |
|  |
|   |



map http://inbound.example.org http://origin.example.org \  
@plugin=header_rewrite.so @pparam=header_conf \  @plugin=cachekey.so 
@pparam=--include-headers=@method
header_conf:cond %{REMAP_PSEUDO_HOOK}
  add-header @Method %<cqhl>
miles



    On Wednesday, March 30, 2016 9:20 AM, Sudheer Vinukonda 
<[email protected]> wrote:
 
Regardless, the important thing to note is what Leif mentioned - if you plan on 
caching HEAD, then your cache key should include the method (this should be 
possible with a plugin or even the Gancho's cachekey plugin?). Otherwise, 
there's a danger of serving broken responses to GET requests.

On Wednesday, March 30, 2016 9:01 AM, Leif Hedstrom <[email protected]> wrote:





On Mar 30, 2016, at 8:41 AM, Esmq <[email protected]> wrote:
>
>set proxy.config.http.cache.allow_empty_doc to 1 can't have head request 
>cached.
>and only if object was in cache already, head request will satisfy from cache.
>
>
>can ats cached head request ?
>


No. Looking at the code, I don’t see a way to force it to do so, and 
regardless, that would imply that the cache key would have to include the 
request method as well as the URL (which I’m fairly certain we do not do 
either).

— Leif

  

Reply via email to