Skip to content

Commit bebba07

Browse files
authored
Fix LRU debugger display on net standard (#458)
1 parent a99aa78 commit bebba07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

BitFaster.Caching/Lru/ConcurrentLruCore.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,11 @@ private static CachePolicy CreatePolicy(ConcurrentLruCore<K, V, I, P, T> lru)
826826
// it becomes immutable. However, this object is then somewhere else on the
827827
// heap, which slows down the policies with hit counter logic in benchmarks. Likely
828828
// this approach keeps the structs data members in the same CPU cache line as the LRU.
829+
#if NETCOREAPP3_0_OR_GREATER
829830
[DebuggerDisplay("Hit = {Hits}, Miss = {Misses}, Upd = {Updated}, Evict = {Evicted}")]
831+
#else
832+
[DebuggerDisplay("Hit = {Hits}, Miss = {Misses}, Evict = {Evicted}")]
833+
#endif
830834
private class Proxy : ICacheMetrics, ICacheEvents<K, V>, IBoundedPolicy, ITimePolicy
831835
{
832836
private readonly ConcurrentLruCore<K, V, I, P, T> lru;

0 commit comments

Comments
 (0)