diff options
author | vnugent <public@vaughnnugent.com> | 2024-03-06 21:30:58 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-03-06 21:30:58 -0500 |
commit | 4d8cfc10382105b0acbd94df93ad3d05ff91db54 (patch) | |
tree | d9795c60b2e2a4871eddff43311866784c1c054b /plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs | |
parent | 016a96a80cce025a86c6cf26707738f6a2eb2658 (diff) |
refactor: #2 Centralize server state, default discovery endpoints & more
Diffstat (limited to 'plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs')
-rw-r--r-- | plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs b/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs index b7bf83f..8f196b0 100644 --- a/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs +++ b/plugins/ObjectCacheServer/src/Cache/CacheSystemUtil.cs @@ -29,6 +29,7 @@ using System.Text.Json; using VNLib.Utils.Resources; using VNLib.Plugins; using VNLib.Plugins.Extensions.Loading; +using VNLib.Utils.Extensions; namespace VNLib.Data.Caching.ObjectCache.Server.Cache { @@ -49,7 +50,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, ICacheMemoryManagerFactory heap, CacheConfiguration cacheConf) + public static IBlobCacheTable LoadMemoryCacheSystem(this PluginBase plugin, IConfigScope config, ICacheMemoryManagerFactory heap, CacheMemoryConfiguration cacheConf) { #pragma warning disable CA2000 // Dispose objects before losing scope @@ -94,10 +95,7 @@ namespace VNLib.Data.Caching.ObjectCache.Server.Cache if(initMethod != null) { //Itterate all buckets - foreach (IBlobCacheBucket bucket in table) - { - initMethod.Invoke(bucket.Id); - } + table.ForEach(bucket => initMethod(bucket.Id)); } } |