| 372 | } |
| 373 | |
| 374 | Transaction::CacheStatus |
| 375 | Transaction::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 | |
| 397 | void |
| 398 | Transaction::redirectTo(std::string const &url) |
no test coverage detected