diff options
author | vnugent <public@vaughnnugent.com> | 2023-10-18 00:55:29 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-10-18 00:55:29 -0400 |
commit | 8870972a6401a3cef0202ad744b87508dc324b6b (patch) | |
tree | 252f44306bb9bc1dce70dbf26b1f5549967de65e /lib | |
parent | 3c353afe4dffa3da9c96ef25b02f0004676afe5f (diff) |
Essentials, plugins, and http core experimental updates
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheBucket.cs | 2 | ||||
-rw-r--r-- | lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheTable.cs | 10 |
2 files changed, 6 insertions, 6 deletions
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 /// </summary> public sealed class BlobCacheBucket : IBlobCacheBucket { - private readonly IBlobCache _cacheTable; + private readonly BlobCache _cacheTable; private readonly SemaphoreSlim _lock; ///<inheritdoc/> 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 |