TSHTTPTXNC...OKUPURLGET(3ts)
β¨ NAME β¨
bestie we're in the Apache Traffic Server manual, section 3ts, and this page is TSHTTPTXNC...OKUPURLGET(3ts) β iconic name, no notes π
TSHttpTxnCacheLookupUrlGetβ theTSHttpTxnCacheLookupUrlGetAPI function π
πΈ SYNOPSIS πΈ
#include <ts/ts.h>
TSReturnCode TSHttpTxnCacheLookupUrlGet(TSHttpTxn txnp, TSMBuffer bufp,
TSMLoc offset)
π DESCRIPTION π
okay so picture this: you want the current cache key URL, which everybody also calls the lookup URL. That's literally what this gives you π«Ά
Where does it go? It must be stashed in a properly allocated URL object β typically one you made with a TSUrlCreate(). Don't just vibe it into random memory, bestie, allocate it properly. β¨
π TSHTTPTXNCACHELOOKUPURLSET π
π Synopsis π
#include <ts/ts.h>
TSReturnCode TSHttpTxnCacheLookupUrlSet(TSHttpTxn txnp, TSMBuffer bufp,
TSMLoc offset)
π¦ Description π¦
This one sets the current cache key URL β yes, the lookup URL again, same energy, opposite direction π
And again: it must live in a properly allocated URL object, typically created with a TSUrlCreate() or a TSUrlClone().
Now for the timing tea β β you can call this API as early as TS_HTTP_READ_REQUEST_HDR_HOOK but no later than TS_HTTP_POST_REMAP_HOOK. Miss that window and it's not giving what you want it to give π
This is the preferred and most efficient way to modify the cache key, fr fr. There is an alternative though β the old TSCacheUrlSet(), which just takes a simple string as its argument. It works, but it's not the main character here π
π COPYRIGHT π
2026, dev@trafficserver.apache.org
and that's the whole page, bestie π this was Apache Traffic Server 9.2, dated Feb 12, 2026 β go forth and cache-key responsibly, ily, bye! πΈπ¦β¨
π¦ where this page comes from
- ubuntu noble: trafficserver-dev 9.2.3+ds-1+deb12u1ubuntu0.1 Β· Apache-2.0
- ubuntu questing: trafficserver-dev 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms