{
N Create(K key, V value);
+ bool IsExpired(N node);
+ void AdvanceTime();
+ void OnRead(N node);
+ void OnWrite(N node);
+ void OnEvict(N node);
+ void ExpireEntries(ref ConcurrentLfuCore cache) where P : struct, INodePolicy;
}
internal struct AccessOrderPolicy : INodePolicy>
+ where K : notnull
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public AccessOrderNode Create(K key, V value)
{
return new AccessOrderNode(key, value);
}
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public bool IsExpired(AccessOrderNode node)
+ {
+ return false;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void AdvanceTime()
+ {
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void OnRead(AccessOrderNode node)
+ {
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void OnWrite(AccessOrderNode node)
+ {
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void OnEvict(AccessOrderNode node)
+ {
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void ExpireEntries(ref ConcurrentLfuCore, P> cache) where P : struct, INodePolicy