aboutsummaryrefslogtreecommitdiff
path: root/lib/VNLib.Data.Caching.ObjectCache/src
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-07-13 13:20:25 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-07-13 13:20:25 -0400
commit2f674e79d42e7d36225fa9ac7ecefbc5bc62d325 (patch)
treec58999489f5391bc044e7a9bb3e557afe2860415 /lib/VNLib.Data.Caching.ObjectCache/src
parent1a8ab1457244d15b19ddcc94958f645f5ec2abc7 (diff)
Checkpoint, kind of working clustering
Diffstat (limited to 'lib/VNLib.Data.Caching.ObjectCache/src')
-rw-r--r--lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs4
-rw-r--r--lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs
index f77587b..5e28dde 100644
--- a/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs
+++ b/lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs
@@ -187,9 +187,9 @@ namespace VNLib.Data.Caching.ObjectCache
{
//remove the entry and bypass the disposal
bool result = base.Remove(objectId);
-#if DEBUG
+
Debug.Assert(result == true);
-#endif
+
return true;
}
diff --git a/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs b/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs
index a02605e..f650cc3 100644
--- a/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs
+++ b/lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs
@@ -24,6 +24,7 @@
using System;
using System.Buffers;
+using System.Diagnostics;
using System.Buffers.Binary;
using System.Runtime.CompilerServices;
@@ -204,10 +205,9 @@ namespace VNLib.Data.Caching
//Get the data segment
Span<byte> segment = GetDataSegment();
-#if DEBUG
//Test segment length is equivalent to the requested data length
- System.Diagnostics.Debug.Assert(segment.Length == data.Length);
-#endif
+ Debug.Assert(segment.Length == data.Length);
+
//Copy data segment
data.CopyTo(segment);
}