MCPcopy Create free account
hub / github.com/apache/trafficserver / _destroy

Method _destroy

src/iocore/cache/RamCacheCLFUS.cc:405–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405RamCacheCLFUSEntry *
406RamCacheCLFUS::_destroy(RamCacheCLFUSEntry *e)
407{
408 RamCacheCLFUSEntry *ret = e->hash_link.next;
409 this->_move_compressed(e);
410 this->_lru[e->flag_bits.lru].remove(e);
411 if (!e->flag_bits.lru) {
412 this->_objects--;
413 this->_bytes -= e->size + ENTRY_OVERHEAD;
414 ts::Metrics::Gauge::decrement(cache_rsb.ram_cache_bytes, e->size);
415 ts::Metrics::Gauge::decrement(stripe->cache_vol->vol_rsb.ram_cache_bytes, e->size);
416 e->data = nullptr;
417 } else {
418 this->_history--;
419 }
420 uint32_t b = e->key.slice32(3) % this->_nbuckets;
421 this->_bucket[b].remove(e);
422 DDbg(dbg_ctl_ram_cache, "put %X %" PRId64 " DESTROYED", e->key.slice32(3), e->auxkey);
423 THREAD_FREE(e, ramCacheCLFUSEntryAllocator, this_thread());
424 return ret;
425}
426
427void
428RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)

Callers 2

getMethod · 0.95
putMethod · 0.95

Calls 3

_move_compressedMethod · 0.95
this_threadFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected