Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions BitFaster.Caching.UnitTests/Lru/ClassicLruTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,6 @@ public void WhenItemDoesNotExistTryGetReturnsNullAndFalse()
value.Should().BeNull();
}

[Fact]
public void WhenItemIsAddedThenRetrievedHitRatioIsHalf()
{
lru.GetOrAdd(1, valueFactory.Create);
bool result = lru.TryGet(1, out var value);

#pragma warning disable CS0618 // Type or member is obsolete
lru.HitRatio.Should().Be(0.5);
#pragma warning restore CS0618 // Type or member is obsolete
}

[Fact]
public void MetricsAreEnabled()
{
Expand Down
6 changes: 0 additions & 6 deletions BitFaster.Caching/Lru/ClassicLru.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ public ClassicLru(int concurrencyLevel, int capacity, IEqualityComparer<K> compa
///<inheritdoc/>
public int Capacity => this.capacity;

/// <summary>
/// Gets the ratio of hits to misses, where a value of 1 indicates 100% hits.
/// </summary>
[ObsoleteAttribute("This property is obsolete. Use Metrics instead.", false)]
public double HitRatio => this.Metrics.HitRatio;

///<inheritdoc/>
public ICacheMetrics Metrics => this.metrics;

Expand Down