@@ -313,6 +313,8 @@ class CacheAllocatorConfig {
313
313
314
314
// Insert items to first free memory tier
315
315
CacheAllocatorConfig& enableInsertToFirstFreeTier ();
316
+
317
+ CacheAllocatorConfig& enableNoOnlineEviction ();
316
318
317
319
// Passes in a callback to initialize an event tracker when the allocator
318
320
// starts
@@ -535,6 +537,8 @@ class CacheAllocatorConfig {
535
537
// from the bottom one if memory cache is full
536
538
bool insertToFirstFreeTier = false ;
537
539
540
+ bool noOnlineEviction = false ;
541
+
538
542
// the number of tries to search for an item to evict
539
543
// 0 means it's infinite
540
544
unsigned int evictionSearchTries{50 };
@@ -676,6 +680,12 @@ CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::enableInsertToFirstFreeTier()
676
680
return *this ;
677
681
}
678
682
683
+ template <typename T>
684
+ CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::enableNoOnlineEviction() {
685
+ noOnlineEviction = true ;
686
+ return *this ;
687
+ }
688
+
679
689
template <typename T>
680
690
CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::setCacheName(
681
691
const std::string& _cacheName) {
@@ -1256,6 +1266,7 @@ std::map<std::string, std::string> CacheAllocatorConfig<T>::serialize() const {
1256
1266
configMap[" delayCacheWorkersStart" ] =
1257
1267
delayCacheWorkersStart ? " true" : " false" ;
1258
1268
configMap[" insertToFirstFreeTier" ] = std::to_string (insertToFirstFreeTier);
1269
+ configMap[" noOnlineEviction" ] = std::to_string (noOnlineEviction);
1259
1270
mergeWithPrefix (configMap, throttleConfig.serialize (), " throttleConfig" );
1260
1271
mergeWithPrefix (configMap,
1261
1272
chainedItemAccessConfig.serialize (),
0 commit comments