Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/12825 )
Change subject: [util] introduce TTL cache ...................................................................... [util] introduce TTL cache This changelist introduces TTL cache based on the cache implementation from util/cache.{h,cc} with FIFO eviction policy. A unit test to cover the new functionality is added as well. Expired entries are not returned from the cache, but kept around until they are lazily purged upon cache reaching its capacity while accommodating more entries. A follow-up patch will introduce automatic scrubbing of the TTL cache, purging of expired entries periodically. Change-Id: Ic8aa0ebe6b26bf34ca0e02bebbdb6a94f6b00621 Reviewed-on: http://gerrit.cloudera.org:8080/12825 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <aser...@cloudera.com> --- M src/kudu/util/CMakeLists.txt M src/kudu/util/cache.cc M src/kudu/util/cache.h A src/kudu/util/ttl_cache-test.cc A src/kudu/util/ttl_cache.h A src/kudu/util/ttl_cache_metrics.h A src/kudu/util/ttl_cache_test_metrics.cc A src/kudu/util/ttl_cache_test_metrics.h 8 files changed, 776 insertions(+), 1 deletion(-) Approvals: Kudu Jenkins: Verified Alexey Serbin: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/12825 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic8aa0ebe6b26bf34ca0e02bebbdb6a94f6b00621 Gerrit-Change-Number: 12825 Gerrit-PatchSet: 11 Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Hao Hao <hao....@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)