Skip to content

Commit 7ffc616

Browse files
committed
deal with rebase conflicts
1 parent 2faa3f7 commit 7ffc616

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/Libraries/Microsoft.Extensions.Caching.Hybrid/Internal/DefaultHybridCache.L2.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ internal async Task<long> SafeReadTagInvalidationAsync(string tag)
171171
buffer.RecycleIfAppropriate();
172172
return timestamp;
173173
}
174-
catch (Exception ex) // this is the "Safe" in "SafeReadTagInvalidationAsync"
174+
catch (Exception ex)
175175
{
176+
// ^^^ this catch is the "Safe" in "SafeReadTagInvalidationAsync"
176177
Debug.WriteLine(ex.Message);
177178

178179
// if anything goes wrong reading tag invalidations; we have to assume the tag is invalid

src/Libraries/Microsoft.Extensions.Caching.Hybrid/Internal/DefaultHybridCache.Serialization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private bool TrySerialize<T>(T value, out BufferChunk buffer, out IHybridCacheSe
6767

6868
serializer.Serialize(value, writer);
6969

70-
buffer = new(writer.DetachCommitted(out var length), length, returnToPool: true); // remove buffer ownership from the writer
70+
buffer = new(writer.DetachCommitted(out var length), 0, length, returnToPool: true); // remove buffer ownership from the writer
7171
writer.Dispose(); // we're done with the writer
7272
return true;
7373
}

test/Libraries/Microsoft.Extensions.Caching.Hybrid.Tests/LocalInvalidationTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ public async Task TagBasedInvalidate(bool withL2)
7777
}
7878

7979
Guid lastValue = Guid.Empty;
80-
for (int i = 0; i < 3; i++) // because we want to test pre-existing L1/L2 impact
80+
81+
// loop because we want to test pre-existing L1/L2 impact
82+
for (int i = 0; i < 3; i++)
8183
{
8284
using var services = GetDefaultCache(out var cache, svc =>
8385
{

0 commit comments

Comments
 (0)