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
5 changes: 5 additions & 0 deletions BitFaster.Caching.UnitTests/Lru/AfterAccessPolicyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ public async Task UpdateUpdatesTickCount()
public void WhenItemIsExpiredShouldDiscardIsTrue()
{
var item = this.policy.CreateItem(1, 2);

#if NETFRAMEWORK
item.TickCount = Stopwatch.GetTimestamp() - StopwatchTickConverter.ToTicks(TimeSpan.FromSeconds(11));
#else
item.TickCount = Environment.TickCount - (int)TimeSpan.FromSeconds(11).ToEnvTick64();
#endif

this.policy.ShouldDiscard(item).Should().BeTrue();
}
Expand Down
2 changes: 1 addition & 1 deletion BitFaster.Caching/IDiscreteTimePolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace BitFaster.Caching
public interface IDiscreteTimePolicy
{
/// <summary>
/// Gets the time to live for an item in the cache.
/// Gets the time to expire for an item in the cache.
/// </summary>
/// <param name="key">The key of the item.</param>
/// <param name="timeToExpire">If the key exists, the time to live for the item with the specified key.</param>
Expand Down