diff options
Diffstat (limited to 'lib/VNLib.Data.Caching.ObjectCache')
-rw-r--r-- | lib/VNLib.Data.Caching.ObjectCache/src/BlobCache.cs | 4 | ||||
-rw-r--r-- | lib/VNLib.Data.Caching.ObjectCache/src/CacheEntry.cs | 6 |
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); } |