* copy the data from request into cache_obj * @param cache_obj * @param req */
| 26 | * @param req |
| 27 | */ |
| 28 | void copy_request_to_cache_obj(cache_obj_t *cache_obj, const request_t *req) { |
| 29 | cache_obj->obj_size = req->obj_size; |
| 30 | #ifdef SUPPORT_TTL |
| 31 | if (req->ttl != 0) |
| 32 | cache_obj->exp_time = req->clock_time + req->ttl; |
| 33 | else |
| 34 | cache_obj->exp_time = 0; |
| 35 | #endif |
| 36 | cache_obj->obj_id = req->obj_id; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * create a cache_obj from request |
no outgoing calls
no test coverage detected