diff --git a/BitFaster.Caching/Lru/EqualCapacityPartition.cs b/BitFaster.Caching/Lru/EqualCapacityPartition.cs index a193efba..9808283d 100644 --- a/BitFaster.Caching/Lru/EqualCapacityPartition.cs +++ b/BitFaster.Caching/Lru/EqualCapacityPartition.cs @@ -9,30 +9,23 @@ namespace BitFaster.Caching.Lru [DebuggerDisplay("{Hot}/{Warm}/{Cold}")] public class EqualCapacityPartition : ICapacityPartition { - private readonly int hotCapacity; - private readonly int warmCapacity; - private readonly int coldCapacity; - /// /// Initializes a new instance of the EqualCapacityPartition class with the specified total capacity. /// /// The total capacity. public EqualCapacityPartition(int totalCapacity) { - var (hot, warm, cold) = ComputeQueueCapacity(totalCapacity); - this.hotCapacity = hot; - this.warmCapacity = warm; - this.coldCapacity = cold; + (Hot, Warm, Cold) = ComputeQueueCapacity(totalCapacity); } /// - public int Cold => this.coldCapacity; + public int Cold { get; } /// - public int Warm => this.warmCapacity; + public int Warm { get; } /// - public int Hot => this.hotCapacity; + public int Hot { get; } private static (int hot, int warm, int cold) ComputeQueueCapacity(int capacity) {