@@ -315,6 +315,8 @@ class CacheAllocatorConfig {
315315
316316  //  Insert items to first free memory tier
317317  CacheAllocatorConfig& enableInsertToFirstFreeTier ();
318+   
319+   CacheAllocatorConfig& enableNoOnlineEviction ();
318320
319321  //  Passes in a callback to initialize an event tracker when the allocator
320322  //  starts
@@ -547,6 +549,8 @@ class CacheAllocatorConfig {
547549  //  from the bottom one if memory cache is full
548550  bool  insertToFirstFreeTier = false ;
549551
552+   bool  noOnlineEviction = false ;
553+ 
550554  //  the number of tries to search for an item to evict
551555  //  0 means it's infinite
552556  unsigned  int  evictionSearchTries{50 };
@@ -687,6 +691,12 @@ CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::enableInsertToFirstFreeTier()
687691  return  *this ;
688692}
689693
694+ template  <typename  T>
695+ CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::enableNoOnlineEviction() {
696+   noOnlineEviction = true ;
697+   return  *this ;
698+ }
699+ 
690700template  <typename  T>
691701CacheAllocatorConfig<T>& CacheAllocatorConfig<T>::setCacheName(
692702    const  std::string& _cacheName) {
@@ -1269,6 +1279,7 @@ std::map<std::string, std::string> CacheAllocatorConfig<T>::serialize() const {
12691279  configMap[" delayCacheWorkersStart" 
12701280      delayCacheWorkersStart ? " true" " false" 
12711281  configMap[" insertToFirstFreeTier" std::to_string (insertToFirstFreeTier);
1282+   configMap[" noOnlineEviction" std::to_string (noOnlineEviction);
12721283  mergeWithPrefix (configMap, throttleConfig.serialize (), " throttleConfig" 
12731284  mergeWithPrefix (configMap,
12741285                  chainedItemAccessConfig.serialize (),
0 commit comments