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

Method getCacheStatus

src/tscpp/api/Transaction.cc:374–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374Transaction::CacheStatus
375Transaction::getCacheStatus()
376{
377 int obj_status = TS_ERROR;
378
379 if (TSHttpTxnCacheLookupStatusGet(state_->txn_, &obj_status) == TS_ERROR) {
380 return CACHE_LOOKUP_NONE;
381 }
382
383 switch (obj_status) {
384 case TS_CACHE_LOOKUP_MISS:
385 return CACHE_LOOKUP_MISS;
386 case TS_CACHE_LOOKUP_HIT_STALE:
387 return CACHE_LOOKUP_HIT_STALE;
388 case TS_CACHE_LOOKUP_HIT_FRESH:
389 return CACHE_LOOKUP_HIT_FRESH;
390 case TS_CACHE_LOOKUP_SKIPPED:
391 return CACHE_LOOKUP_SKIPPED;
392 default:
393 return CACHE_LOOKUP_NONE;
394 }
395}
396
397void
398Transaction::redirectTo(std::string const &url)

Callers 1

Calls 1

Tested by

no test coverage detected