8 implementations of Get
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Storage\DiskBasedResponseCache.cs (1)
51public byte[]? Get(string key)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Storage\AzureStorageResponseCache.cs (1)
42public byte[]? Get(string key)
Microsoft.Extensions.AI.Tests (1)
TestInMemoryCacheStorage.cs (1)
18public byte[]? Get(string key)
Microsoft.Extensions.Caching.Hybrid.Tests (4)
L2Tests.cs (1)
217byte[]? IDistributedCache.Get(string key)
NullDistributedCache.cs (1)
11byte[]? IDistributedCache.Get(string key) => null;
StampedeTests.cs (1)
41byte[]? IDistributedCache.Get(string key) => throw new NotSupportedException("Intentionally not provided");
UnreliableL2Tests.cs (1)
163public byte[]? Get(string key) => throw new NotSupportedException(); // only async API in use
Microsoft.Extensions.Caching.Memory (1)
MemoryDistributedCache.cs (1)
46public byte[]? Get(string key)
29 references to Get
Microsoft.AspNetCore.Session (1)
DistributedSession.cs (1)
184var data = _cache.Get(_sessionKey);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (15)
ResponseCacheTester.cs (15)
44Assert.Null(cache.Get(_keyB)); 51cached = cache.Get(_keyB) ?? []; 71cached = cache.Get(_keyB) ?? []; 78Assert.Null(cache.Get(_keyB)); 100cached = cache.Get(_keyB) ?? []; 106Assert.Null(cache.Get(_keyB)); 120Assert.Null(cache.Get(_keyA)); 123Assert.True(_responseA.SequenceEqual(cache.Get(_keyA) ?? [])); 124Assert.True(_responseA.SequenceEqual(cache2.Get(_keyA) ?? [])); 127Assert.True(_responseB.SequenceEqual(cache2.Get(_keyB) ?? [])); 128Assert.True(_responseB.SequenceEqual(cache.Get(_keyB) ?? [])); 150cached = cache.Get(_keyB) ?? []; 163Assert.Null(cache.Get(_keyB)); 182cached = cache.Get(_keyB) ?? []; 188Assert.Null(cache.Get(_keyB));
Microsoft.Extensions.Caching.Abstractions (2)
DistributedCacheExtensions.cs (1)
118byte[]? data = cache.Get(key);
IBufferDistributedCache.cs (1)
21/// <remarks>This method is functionally similar to <see cref="IDistributedCache.Get(string)"/>, but avoids the array allocation.</remarks>
Microsoft.Extensions.Caching.Hybrid.Tests (11)
DistributedCacheTests.cs (6)
68Assert.Null(cache.Get(key)); 74var actual = cache.Get(key); 82actual = cache.Get(key); 87actual = cache.Get(key); 114Assert.Null(cache.Get(key)); 180Assert.Null(cache.Get(key));
L2Tests.cs (2)
183var buffer = Tail.Get(key); 221return Tail.Get(key);
UnreliableL2Tests.cs (3)
31Assert.NotNull(l2.Tail.Get("x")); // exists 38Assert.NotNull(l2.Tail.Get("y")); // exists 42Assert.Null(l2.Tail.Get("y")); // does not exist