MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / copy_request_to_cache_obj

Function copy_request_to_cache_obj

libCacheSim/cache/cacheObj.c:28–37  ·  view source on GitHub ↗

* copy the data from request into cache_obj * @param cache_obj * @param req */

Source from the content-addressed store, hash-verified

26 * @param req
27 */
28void 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

Callers 3

obj_initFunction · 0.85
chained_hashtable_insertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected