Cache Tower v0.6.0 Release Notes

Release Date: 2020-03-22 // over 1 year ago
  • Breaking Changes

    • ๐Ÿšš ICacheContext has been removed (#19 & #21)
    • ๐Ÿ‘ TContext for CacheStack<TContext> is now provided by a factory method (with support via Dependency Injection) (#20 & #21)

    Noteworthy Changes

    • ๐Ÿ‘Œ Support for new context-less CacheStack with GetOrSetAsync method (#21)

Previous changes from v0.5.0

  • 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.