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

Function isCacheObjTransformable

plugins/esi/esi.cc:1365–1379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1363}
1364
1365static bool
1366isCacheObjTransformable(TSHttpTxn txnp, const OptionInfo *pOptionInfo, bool *intercept_header, bool *head_only)
1367{
1368 int obj_status;
1369 if (TSHttpTxnCacheLookupStatusGet(txnp, &obj_status) == TS_ERROR) {
1370 TSError("[esi][%s] Couldn't get cache status of object", __FUNCTION__);
1371 return false;
1372 }
1373 if (obj_status == TS_CACHE_LOOKUP_HIT_FRESH) {
1374 Dbg(dbg_ctl_local, "[%s] doc found in cache, will add transformation", __FUNCTION__);
1375 return isTxnTransformable(txnp, true, pOptionInfo, intercept_header, head_only);
1376 }
1377 Dbg(dbg_ctl_local, "[%s] cache object's status is %d; not transformable", __FUNCTION__, obj_status);
1378 return false;
1379}
1380
1381static bool
1382isInterceptRequest(TSHttpTxn txnp)

Callers 1

globalHookHandlerFunction · 0.85

Calls 3

isTxnTransformableFunction · 0.85
TSErrorFunction · 0.50

Tested by

no test coverage detected