Skip to content

FastConcurrentTLru's Constructor timetolive is not precise on liunx mac platform #117

@442575816

Description

@442575816

FastConcurrentTLru use TLruLongTicksPolicy. this policy discard item by

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool ShouldDiscard(LongTickCountLruItem<K, V> item)
{
    if (Stopwatch.GetTimestamp() - item.TickCount > this.timeToLive)
    {
        return true;
    }

    return false;
}

but the Stopwatch.GetTimestamp() has platform different result. see

https://stackoverflow.com/questions/67205283/stopwatch-gettimestamp-produced-different-results-on-linux-vs-windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions