@@ -315,6 +315,8 @@ class CacheAllocatorConfig {
315
315
316
316
// Insert items to first free memory tier
317
317
CacheAllocatorConfig& enableInsertToFirstFreeTier ();
318
+
319
+ CacheAllocatorConfig& enableNoOnlineEviction ();
318
320
319
321
// Passes in a callback to initialize an event tracker when the allocator
320
322
// starts
@@ -547,6 +549,8 @@ class CacheAllocatorConfig {
547
549
// from the bottom one if memory cache is full
548
550
bool insertToFirstFreeTier = false ;
549
551
552
+ bool noOnlineEviction = false ;
553
+
550
554
// the number of tries to search for an item to evict
551
555
// 0 means it's infinite
552
556
unsigned int evictionSearchTries{50 };
@@ -687,6 +691,12 @@ CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::enableInsertToFirstFreeTier()
687
691
return *this ;
688
692
}
689
693
694
+ template <typename T>
695
+ CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::enableNoOnlineEviction() {
696
+ noOnlineEviction = true ;
697
+ return *this ;
698
+ }
699
+
690
700
template <typename T>
691
701
CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::setCacheName(
692
702
const std::string& _cacheName) {
@@ -1269,6 +1279,7 @@ std::map<std::string, std::string> CacheAllocatorConfig<T>::serialize() const {
1269
1279
configMap[" delayCacheWorkersStart" ] =
1270
1280
delayCacheWorkersStart ? " true" : " false" ;
1271
1281
configMap[" insertToFirstFreeTier" ] = std::to_string (insertToFirstFreeTier);
1282
+ configMap[" noOnlineEviction" ] = std::to_string (noOnlineEviction);
1272
1283
mergeWithPrefix (configMap, throttleConfig.serialize (), " throttleConfig" );
1273
1284
mergeWithPrefix (configMap,
1274
1285
chainedItemAccessConfig.serialize (),
0 commit comments