aboutsummaryrefslogtreecommitdiff
path: root/lib/VNLib.Data.Caching.ObjectCache/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNLib.Data.Caching.ObjectCache/src')
-rw-r--r--lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheBucket.cs2
-rw-r--r--lib/VNLib.Data.Caching.ObjectCache/src/BlobCacheTable.cs10
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