Implementation of the EvictionCallback interface. This maintains a record of all evictions, keys and values.
| 56 | // Implementation of the EvictionCallback interface. This maintains a record of all |
| 57 | // evictions, keys and values. |
| 58 | void EvictedEntry(Slice key, Slice val) override { |
| 59 | evicted_keys_.push_back(DecodeInt(key)); |
| 60 | evicted_values_.push_back(DecodeInt(val)); |
| 61 | } |
| 62 | |
| 63 | // Lookup the key. Return the value on success or -1 on failure. |
| 64 | int Lookup(int key, Cache::LookupBehavior behavior = Cache::NORMAL) { |
no test coverage detected