Lookup the key. Return the value on success or -1 on failure.
| 62 | |
| 63 | // Lookup the key. Return the value on success or -1 on failure. |
| 64 | int Lookup(int key, Cache::LookupBehavior behavior = Cache::NORMAL) { |
| 65 | auto handle(cache_->Lookup(EncodeInt(key), behavior)); |
| 66 | return handle ? DecodeInt(cache_->Value(handle)) : -1; |
| 67 | } |
| 68 | |
| 69 | void UpdateCharge(int key, int charge) { |
| 70 | auto handle(cache_->Lookup(EncodeInt(key), Cache::NO_UPDATE)); |
no test coverage detected