Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fc958188 authored by Jack He's avatar Jack He
Browse files

LruCache: Improve efficieny and ease of use of APIs

* Add a Find() function that returns the pointer to the value associated
  with a key, further changes to the value using that poitner does not
  warm up the cache
* Remove eviction callback, but instead return an optional evicted node
  when Put() evicts a cold node. This prevents potential deadlock when
  calling LruCache methods in the callback
* HasKey() is not zero-copy
* Get() calls Find()
* Add unit tests for these new features
* Modify MetricIdAllocator to use these new features

Bug: 143515989
Test: atest --host bluetooth_test_common
Change-Id: I9071c86a9041e5c95b349824889ccedf9f9c18dc
Merged-In: I9071c86a9041e5c95b349824889ccedf9f9c18dc
(cherry picked from commit 42f8c2b972c3fb39a9b1e3fbff3fcb3a0060c33e)
parent 846b2e9a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment