[
https://issues.apache.org/jira/browse/TS-1622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534567#comment-13534567
]
ligang commented on TS-1622:
----------------------------
how about this ?
int TSRespIsCacheable(TSHttpTxn txnp)
{
sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
HttpSM *sm = (HttpSM *) txnp;
HTTPHdr *req_hdr = &(sm->t_state.hdr_info.client_request);
HTTPHdr *resp_hdr = &(sm->t_state.hdr_info.server_response);
return HttpTransact::is_response_cacheable(&sm->t_state, req_hdr, resp_hdr);
}
> Add an API to query if a response header would be cacheable
> -----------------------------------------------------------
>
> Key: TS-1622
> URL: https://issues.apache.org/jira/browse/TS-1622
> Project: Traffic Server
> Issue Type: Improvement
> Reporter: Leif Hedstrom
>
> It would be useful for a plugin to be able to take e.g. a response header (a
> Hdr object) and ask the HttpSM if this response would be cacheable or not. It
> should use the same logic (and configs) as the core does normally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira