MCPcopy Create free account
hub / github.com/apache/trafficserver / TSHttpTxnCacheDiskPathGet

Function TSHttpTxnCacheDiskPathGet

src/api/InkAPI.cc:4308–4324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4306}
4307
4308const char *
4309TSHttpTxnCacheDiskPathGet(TSHttpTxn txnp, int *length)
4310{
4311 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
4312
4313 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
4314 char const *path = nullptr;
4315
4316 if (HttpCacheSM *c_sm = &(sm->get_cache_sm()); c_sm) {
4317 path = c_sm->get_disk_path();
4318 }
4319 if (length) {
4320 *length = path ? strlen(path) : 0;
4321 }
4322
4323 return path;
4324}
4325
4326TSReturnCode
4327TSHttpTxnCacheLookupUrlGet(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc obj)

Callers 1

InjectCacheInfoHeaderFunction · 0.85

Calls 2

sdk_sanity_check_txnFunction · 0.85
get_disk_pathMethod · 0.45

Tested by

no test coverage detected