Exemplo n.º 1
0
        public void ConstructAddAndRetrieveWithCustomComparerReturnsValue()
        {
            var lru = new FastConcurrentLru <string, int>(9, 9, StringComparer.OrdinalIgnoreCase);

            lru.GetOrAdd("foo", k => 1);

            lru.TryGet("FOO", out var value).Should().BeTrue();
            value.Should().Be(1);
        }
Exemplo n.º 2
0
 public int FastConcurrentLru()
 {
     fastConcurrentLru.TryGet(1, out var value);
     return(value);
 }
Exemplo n.º 3
0
 /// <inheritdoc/>
 public override bool TryGetItem(TKey key, bool markAsHit, out TItem item) => realCache.TryGet(key, out item);