4 instantiations of BufferChunk
Microsoft.Extensions.Caching.Hybrid (4)
Internal\DefaultHybridCache.L2.cs (3)
51
?
new
(writer.DetachCommitted(out var length), length, returnToPool: true)
68
?
new
(writer.DetachCommitted(out var length), length, returnToPool: true)
140
return
new
(payload);
Internal\DefaultHybridCache.Serialization.cs (1)
70
buffer =
new
(writer.DetachCommitted(out var length), length, returnToPool: true); // remove buffer ownership from the writer
20 references to BufferChunk
Microsoft.Extensions.Caching.Hybrid (20)
Internal\BufferChunk.cs (2)
86
internal
BufferChunk
DoNotReturnToPool()
88
var
copy = this;
Internal\DefaultHybridCache.CacheItem.cs (1)
40
public abstract bool TryReserveBuffer(out
BufferChunk
buffer);
Internal\DefaultHybridCache.ImmutableCacheItem.cs (1)
54
public override bool TryReserveBuffer(out
BufferChunk
buffer)
Internal\DefaultHybridCache.L2.cs (7)
21
internal ValueTask<
BufferChunk
> GetFromL2Async(string key, CancellationToken token)
50
BufferChunk
result = pendingBuffers.GetAwaiter().GetResult()
59
static async Task<
BufferChunk
> AwaitedLegacyAsync(Task<byte[]?> pending, DefaultHybridCache @this)
65
static async Task<
BufferChunk
> AwaitedBuffersAsync(ValueTask<bool> pending, RecyclableArrayBufferWriter<byte> writer)
67
BufferChunk
result = await pending.ConfigureAwait(false)
75
internal ValueTask SetL2Async(string key, in
BufferChunk
buffer, HybridCacheEntryOptions? options, CancellationToken token)
131
private
BufferChunk
GetValidPayloadSegment(byte[]? payload)
Internal\DefaultHybridCache.MutableCacheItem.cs (3)
14
private
BufferChunk
_buffer;
21
public void SetValue(ref
BufferChunk
buffer, IHybridCacheSerializer<T> serializer)
73
public override bool TryReserveBuffer(out
BufferChunk
buffer)
Internal\DefaultHybridCache.Serialization.cs (1)
56
private bool TrySerialize<T>(T value, out
BufferChunk
buffer, out IHybridCacheSerializer<T>? serializer)
Internal\DefaultHybridCache.StampedeStateT.cs (5)
172
BufferChunk
result;
278
BufferChunk
bufferToRelease = default;
279
if (Cache.TrySerialize(newValue, out
var
buffer, out var serializer))
375
private void SetResultAndRecycleIfAppropriate(ref
BufferChunk
value)
425
private void SetResultPreSerialized(T value, ref
BufferChunk
buffer, IHybridCacheSerializer<T>? serializer)