Cache Tower v0.5.0 Release Notes

Release Date: 2019-11-12 // over 4 years ago
  • Noteworthy Changes

    • Waiting tasks are given the refreshed value (492158c)
    • Avoid waiting on refresh and back populating cache in GetOrSetAsync (bb9031f)
    • More accurate connection available checking for Redis (1c28388)
    • MemoryCacheLayer now uses ConcurrentDictionary again (3beacac)
    • 0️⃣ CacheSettings constructor logic has changed - when no StaleAfter is given, the default value is zero rather than being the same value as TimeToLive. (6dd6b15)

    🐎 Performance Improvements

    • CacheStack, when multiple threads are waiting on a refreshed result, performs about 5% faster
    • 🐎 CacheStack, in the caching alternative memory benchmarks, performs significantly better with memory allocations as well as a 6% performance improvement.

    Notes
    🐎 There are some minor memory allocation increases, primarily around going back to using ConcurrentDictionary for MemoryCacheLayer. However, these changes are somewhat offset from the overall performance increase under heavy load that wasn't possible with the custom locking solution.

    With the CacheStack improvements in the caching alternative memory benchmarks, the allocation bonuses primarily come from not using Task.Run (bb9031f). Even though those were not called in the benchmark, their presence must have introduced more work in either the state machine or the final IL that made it perform slower.