////////////////////////////////////////////////////////////////////////// Name : HandleUpdateCachedObject Description: called from the state machine when we are going to modify headers without any server contact. Details : this function does very little. mainly to satisfy the call_transact_and_set_next format and not affect the performance of the non-invalidate operations, which are the
| 3505 | // |
| 3506 | /////////////////////////////////////////////////////////////////////////////// |
| 3507 | void |
| 3508 | HttpTransact::HandleUpdateCachedObject(State *s) |
| 3509 | { |
| 3510 | if (s->cache_info.write_lock_state == HttpTransact::CACHE_WL_SUCCESS) { |
| 3511 | ink_assert(s->cache_info.object_store.valid()); |
| 3512 | ink_assert(s->cache_info.object_store.response_get() != nullptr); |
| 3513 | ink_assert(s->cache_info.object_read != nullptr); |
| 3514 | ink_assert(s->cache_info.object_read->valid()); |
| 3515 | |
| 3516 | if (!s->cache_info.object_store.request_get()) { |
| 3517 | s->cache_info.object_store.request_set(s->cache_info.object_read->request_get()); |
| 3518 | } |
| 3519 | s->request_sent_time = s->cache_info.object_read->request_sent_time_get(); |
| 3520 | s->response_received_time = s->cache_info.object_read->response_received_time_get(); |
| 3521 | if (s->api_update_cached_object == UPDATE_CACHED_OBJECT_CONTINUE) { |
| 3522 | TRANSACT_RETURN(SM_ACTION_CACHE_ISSUE_UPDATE, HttpTransact::HandleUpdateCachedObjectContinue); |
| 3523 | } else { |
| 3524 | TRANSACT_RETURN(SM_ACTION_CACHE_ISSUE_UPDATE, HttpTransact::HandleApiErrorJump); |
| 3525 | } |
| 3526 | } else if (s->api_update_cached_object == UPDATE_CACHED_OBJECT_CONTINUE) { |
| 3527 | // even failed to update, continue to serve from cache |
| 3528 | HandleUpdateCachedObjectContinue(s); |
| 3529 | } else { |
| 3530 | s->api_update_cached_object = UPDATE_CACHED_OBJECT_FAIL; |
| 3531 | HandleApiErrorJump(s); |
| 3532 | } |
| 3533 | } |
| 3534 | |
| 3535 | void |
| 3536 | HttpTransact::HandleUpdateCachedObjectContinue(State *s) |
nothing calls this directly
no test coverage detected