| 234 | |
| 235 | template<Cache::EvictionPolicy policy> |
| 236 | void RLCacheShard<policy>::RL_Remove(RLHandle* e) { |
| 237 | e->next->prev = e->prev; |
| 238 | e->prev->next = e->next; |
| 239 | // Null out the next/prev to make it easy to tell that a handle is |
| 240 | // not part of the cache. |
| 241 | e->next = nullptr; |
| 242 | e->prev = nullptr; |
| 243 | DCHECK_GE(usage_, e->charge()); |
| 244 | usage_ -= e->charge(); |
| 245 | } |
| 246 | |
| 247 | template<Cache::EvictionPolicy policy> |
| 248 | void RLCacheShard<policy>::RL_Append(RLHandle* e) { |