rocksdb/cache
Peter Dillinger 4067acabca Compatibility step for separating BlockCache and GeneralCache APIs (#11450)
Summary:
Add two type aliases for Cache: BlockCache and GeneralCache, and add LRUCacheOptions::MakeSharedGeneralCache(). This will ease upgrade to an intended future change to separate the cache API between block cache and other (general) uses, including row cache. Separating the APIs will make it easier to expose more details of block caching for customization. For example, it would be nice to pass the file unique ID and offset as the logical cache key instead of using a Slice, which could facilitate some file-specific customizations in block cache. This would also make it clear that HyperClockCache is not usable as a general cache, because it can only deal with fixed-size block cache keys.

block_cache, row_cache, and blob_cache are the uses of Cache in the public API. blob_cache should be able to use BlockCache while row_cache is a GeneralCache user, as its keys are of arbitrary size.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11450

Test Plan: see updated unit test.

Reviewed By: anand1976

Differential Revision: D45882067

Pulled By: pdillinger

fbshipit-source-id: ff5d9f0b644f87ae337a29a7728ce3ed07b2a4b2
2023-05-18 20:40:19 -07:00
..
cache.cc HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
cache_bench.cc
cache_bench_tool.cc HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
cache_entry_roles.cc Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_entry_roles.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_entry_stats.h Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
cache_helpers.cc Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_helpers.h Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
cache_key.cc Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
cache_key.h
cache_reservation_manager.cc Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
cache_reservation_manager.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cache_reservation_manager_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
cache_test.cc Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
charged_cache.cc HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
charged_cache.h HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
clock_cache.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
clock_cache.h Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
compressed_secondary_cache.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
compressed_secondary_cache.h Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
compressed_secondary_cache_test.cc Avoid long parameter lists configuring Caches (#11386) 2023-05-01 14:52:01 -07:00
lru_cache.cc Compatibility step for separating BlockCache and GeneralCache APIs (#11450) 2023-05-18 20:40:19 -07:00
lru_cache.h Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
lru_cache_test.cc Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
secondary_cache.cc Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
secondary_cache_adapter.cc Re-clarify SecondaryCache API (#11316) 2023-04-04 15:47:00 -07:00
secondary_cache_adapter.h HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
sharded_cache.cc Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
sharded_cache.h Add hash_seed to Caches (#11391) 2023-05-09 22:24:26 -07:00
typed_cache.h HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00