osquery-1/osquery/utils/caches
Alexander Kindyakov 5974649f2b Simple LRU cache implementation (#5521)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5521

Implementation based on `std::unordered_map` and `std::list`, without any
age-bits or any sort of optimisations. If later we realize we need something
more powerfull we will use some fancy OSS lib for it.

I need it as a cache of "hot" processes in syscall traicing. To read cmdline
from file in `/proc/<pid>/cmdline` less often and preserve cmdline or any other
info about process for the events that came when process is already gone.

Reviewed By: SAlexandru

Differential Revision: D14424352

fbshipit-source-id: 472cf8b542bab2921393b9d2a126c254c791404a
2019-03-14 09:40:10 -07:00
..
tests Simple LRU cache implementation (#5521) 2019-03-14 09:40:10 -07:00
BUCK Simple LRU cache implementation (#5521) 2019-03-14 09:40:10 -07:00
lru-impl.h Simple LRU cache implementation (#5521) 2019-03-14 09:40:10 -07:00
lru.h Simple LRU cache implementation (#5521) 2019-03-14 09:40:10 -07:00