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

Method remove

src/iocore/cache/RamCacheLRU.cc:167–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167RamCacheLRUEntry *
168RamCacheLRU::remove(RamCacheLRUEntry *e)
169{
170 RamCacheLRUEntry *ret = e->hash_link.next;
171 uint32_t b = e->key.slice32(3) % nbuckets;
172 bucket[b].remove(e);
173 lru.remove(e);
174 bytes -= ENTRY_OVERHEAD + e->data->block_size();
175 ts::Metrics::Gauge::decrement(cache_rsb.ram_cache_bytes, ENTRY_OVERHEAD + e->data->block_size());
176 ts::Metrics::Gauge::decrement(stripe->cache_vol->vol_rsb.ram_cache_bytes, ENTRY_OVERHEAD + e->data->block_size());
177
178 DDbg(dbg_ctl_ram_cache, "put %X %" PRIu64 " FREED", e->key.slice32(3), e->auxkey);
179 e->data = nullptr;
180 THREAD_FREE(e, ramCacheLRUEntryAllocator, this_thread());
181 objects--;
182 return ret;
183}
184
185// ignore 'copy' since we don't touch the data
186int

Callers 2

getMethod · 0.45
putMethod · 0.45

Calls 2

this_threadFunction · 0.85
block_sizeMethod · 0.45

Tested by

no test coverage detected