TSHTTPTXNC...OKUPURLGET(3ts)

πŸ“¦
version 9.2.5 Β· 4 versions
, in ubuntu noble, ubuntu questing

✨ NAME ✨

bestie we're in the Apache Traffic Server manual, section 3ts, and this page is TSHTTPTXNC...OKUPURLGET(3ts) β€” iconic name, no notes πŸ’…

  • TSHttpTxnCacheLookupUrlGet β€” the TSHttpTxnCacheLookupUrlGet API 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 πŸ‘‘


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