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

Function SFIFO_get

libCacheSim/cache/eviction/fifo/SFIFO.c:185–191  ·  view source on GitHub ↗

* @brief this function is the user facing API * it performs the following logic * * ``` * if obj in cache: * update_metadata * return true * else: * if cache does not have enough space: * evict until it has space to insert * insert the object * return false * ``` * * @param cache * @param req * @return true if cache hit, false if cache miss */

Source from the content-addressed store, hash-verified

183 * @return true if cache hit, false if cache miss
184 */
185static bool SFIFO_get(cache_t *cache, const request_t *req) {
186#ifdef DEBUG_MODE
187 return SFIFO_get_debug(cache, req);
188#else
189 return cache_get_base(cache, req);
190#endif
191}
192
193// ***********************************************************************
194// **** ****

Callers

nothing calls this directly

Calls 2

SFIFO_get_debugFunction · 0.85
cache_get_baseFunction · 0.85

Tested by

no test coverage detected