From 8870972a6401a3cef0202ad744b87508dc324b6b Mon Sep 17 00:00:00 2001 From: vnugent Date: Wed, 18 Oct 2023 00:55:29 -0400 Subject: Essentials, plugins, and http core experimental updates --- lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheBucket.cs | 2 +- lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheTable.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheBucket.cs b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheBucket.cs index 71c815d..76f0b8d 100644 --- a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheBucket.cs +++ b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheBucket.cs @@ -33,7 +33,7 @@ namespace VNLib.Data.Caching.ObjectCache /// public sealed class BlobCacheBucket : IBlobCacheBucket { - private readonly IBlobCache _cacheTable; + private readonly BlobCache _cacheTable; private readonly SemaphoreSlim _lock; /// diff --git a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheTable.cs b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheTable.cs index 9443737..8270f2f 100644 --- a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheTable.cs +++ b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheTable.cs @@ -38,7 +38,7 @@ namespace VNLib.Data.Caching.ObjectCache public sealed class BlobCacheTable : VnDisposeable, IBlobCacheTable { private readonly uint _tableSize; - private readonly IBlobCacheBucket[] _buckets; + private readonly BlobCacheBucket[] _buckets; private readonly IPersistantCacheStore? _persistant; @@ -75,17 +75,17 @@ namespace VNLib.Data.Caching.ObjectCache //Init bucket table _tableSize = tableSize; - _buckets = new IBlobCacheBucket[tableSize]; - _persistant = persistantCache; //Init buckets - InitBuckets(tableSize, bucketSize, _buckets, factory, persistantCache); + InitBuckets(tableSize, bucketSize, out _buckets, factory, persistantCache); } - private static void InitBuckets(uint size, uint bucketSize, IBlobCacheBucket[] table, ICacheMemoryManagerFactory man, IPersistantCacheStore? persistantCache) + private static void InitBuckets(uint size, uint bucketSize, out BlobCacheBucket[] table, ICacheMemoryManagerFactory man, IPersistantCacheStore? persistantCache) { + table = new BlobCacheBucket[size]; + for(uint i = 0; i < size; i++) { //Get the memory manager for the bucket -- cgit