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) 140return new(payload);
Internal\DefaultHybridCache.Serialization.cs (1)
70buffer = 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)
86internal BufferChunk DoNotReturnToPool() 88var copy = this;
Internal\DefaultHybridCache.CacheItem.cs (1)
40public abstract bool TryReserveBuffer(out BufferChunk buffer);
Internal\DefaultHybridCache.ImmutableCacheItem.cs (1)
54public override bool TryReserveBuffer(out BufferChunk buffer)
Internal\DefaultHybridCache.L2.cs (7)
21internal ValueTask<BufferChunk> GetFromL2Async(string key, CancellationToken token) 50BufferChunk result = pendingBuffers.GetAwaiter().GetResult() 59static async Task<BufferChunk> AwaitedLegacyAsync(Task<byte[]?> pending, DefaultHybridCache @this) 65static async Task<BufferChunk> AwaitedBuffersAsync(ValueTask<bool> pending, RecyclableArrayBufferWriter<byte> writer) 67BufferChunk result = await pending.ConfigureAwait(false) 75internal ValueTask SetL2Async(string key, in BufferChunk buffer, HybridCacheEntryOptions? options, CancellationToken token) 131private BufferChunk GetValidPayloadSegment(byte[]? payload)
Internal\DefaultHybridCache.MutableCacheItem.cs (3)
14private BufferChunk _buffer; 21public void SetValue(ref BufferChunk buffer, IHybridCacheSerializer<T> serializer) 73public override bool TryReserveBuffer(out BufferChunk buffer)
Internal\DefaultHybridCache.Serialization.cs (1)
56private bool TrySerialize<T>(T value, out BufferChunk buffer, out IHybridCacheSerializer<T>? serializer)
Internal\DefaultHybridCache.StampedeStateT.cs (5)
172BufferChunk result; 278BufferChunk bufferToRelease = default; 279if (Cache.TrySerialize(newValue, out var buffer, out var serializer)) 375private void SetResultAndRecycleIfAppropriate(ref BufferChunk value) 425private void SetResultPreSerialized(T value, ref BufferChunk buffer, IHybridCacheSerializer<T>? serializer)