[
https://issues.apache.org/jira/browse/TS-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14569388#comment-14569388
]
Sudheer Vinukonda commented on TS-3652:
---------------------------------------
The problem is not in the fact that the plugin is (or not) modifying the cache
key a second time (before following the redirect). Regardless of when the cache
key is modified, the current implementation ignores that and simply uses the
client request url (which is set to the redirect follow location url) during
redirect follow.
On the same token, I am also not sure if the plugin should in fact modify the
cache key a second time during redirect follow. The plugin may simply (choose
to) not hook at the available hooks during the redirect follow and I wonder if
it makes sense to force the plugin to hook and modify the cache key again. As a
user, I'd expect that, once I modify the cache key for a Txn, that is honored
for that Txn, unless specified otherwise. Does that make sense?
Fwiw, the current form of the TS API *TSCacheUrlSet* doesn't, in fact, allow to
set the cache key more than once for a given Txn (it returns *TS_ERROR* if the
*lookup_url* is already set previously).
> During 3xx redirect follow, TS uses the redirect url as the cache key
> ignoring any cache key set via API
> --------------------------------------------------------------------------------------------------------
>
> Key: TS-3652
> URL: https://issues.apache.org/jira/browse/TS-3652
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP
> Reporter: Sudheer Vinukonda
>
> Currently, during 3xx redirect follow, TS uses the redirect url (as received
> in the *Location* header of the 3xx response) as the cache key for storing
> the subsequent response to the redirect follow request. This works fine in
> most cases, since, the original client request would have cached the 3xx
> response and the final response would still be derived using the redirect
> follow url. This also allows direct requests to the redirect follow location
> be served from the cache efficiently.
> However, this is not desirable in some cases, especially when there's a TS
> API (plugin) modifying the cache key and wanting to store the final response
> against the modified cache key directly.
> Proposing to add a config setting to allow storing API set cache key during
> redirect follow.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)