diff options
author | vnugent <public@vaughnnugent.com> | 2023-10-14 15:50:46 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-10-14 15:50:46 -0400 |
commit | 3c353afe4dffa3da9c96ef25b02f0004676afe5f (patch) | |
tree | 1e3c5889734c029701205c55fa842552ded81c2b /plugins/ObjectCacheServer/src/Cache | |
parent | 531baabc8289eeaa2aad63cb0e86cc3dd978d97e (diff) |
experimential expansion and performance changes
Diffstat (limited to 'plugins/ObjectCacheServer/src/Cache')
-rw-r--r-- | plugins/ObjectCacheServer/src/Cache/CacheStore.cs | 7 | ||||
-rw-r--r-- | plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/plugins/ObjectCacheServer/src/Cache/CacheStore.cs b/plugins/ObjectCacheServer/src/Cache/CacheStore.cs index f94a3f5..5795222 100644 --- a/plugins/ObjectCacheServer/src/Cache/CacheStore.cs +++ b/plugins/ObjectCacheServer/src/Cache/CacheStore.cs @@ -107,11 +107,14 @@ Cache Configuration: //Get the event listener ICacheListenerEventQueue queue = plugin.GetOrCreateSingleton<CacheListenerPubQueue>(); + //Get the memory manager + ICacheMemoryManagerFactory manager = plugin.GetOrCreateSingleton<BucketLocalManagerFactory>(); + //Load the blob cache table system - IBlobCacheTable bc = plugin.LoadMemoryCacheSystem(config, plugin.CacheHeap, cacheConf); + IBlobCacheTable bc = plugin.LoadMemoryCacheSystem(config, manager, cacheConf); //Endpoint only allows for a single reader - return new(bc, queue, plugin.Log, plugin.CacheHeap); + return new(bc, queue, plugin.Log, plugin.ListenerHeap); } /* diff --git a/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs b/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs index 2071d2b..a02fe75 100644 --- a/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs +++ b/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs @@ -30,7 +30,6 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using VNLib.Plugins; -using VNLib.Utils.Memory; using VNLib.Plugins.Extensions.Loading; namespace VNLib.Data.Caching.ObjectCache.Server.Cache @@ -52,7 +51,7 @@ namespace VNLib.Data.Caching.ObjectCache.Server.Cache /// <param name="cacheConf">The cache configuration object</param> /// <returns>The loaded <see cref="IBlobCacheTable"/> implementation</returns> /// <exception cref="FileNotFoundException"></exception> - public static IBlobCacheTable LoadMemoryCacheSystem(this PluginBase plugin, IConfigScope config, IUnmangedHeap heap, CacheConfiguration cacheConf) + public static IBlobCacheTable LoadMemoryCacheSystem(this PluginBase plugin, IConfigScope config, ICacheMemoryManagerFactory heap, CacheConfiguration cacheConf) { //First, try to load persitant cache store PersistantCacheManager? pCManager = GetPersistantStore(plugin, config); @@ -79,7 +78,7 @@ namespace VNLib.Data.Caching.ObjectCache.Server.Cache return table; } - private static IBlobCacheTable GetInternalBlobCache(IUnmangedHeap heap, CacheConfiguration config, IPersistantCacheStore? store) + private static IBlobCacheTable GetInternalBlobCache(ICacheMemoryManagerFactory heap, CacheConfiguration config, IPersistantCacheStore? store) { return new BlobCacheTable(config.BucketCount, config.MaxCacheEntries, heap, store); } |