Redbird v4.0.0-rc.2 Release Notes

Release Date: 2020-11-27 // over 3 years ago
  • 🚀 ###### This patch was authored and released by @Mordil.

    This addresses some semantic issues with the original implementation of SessionDriver for Redis in #175.

    Two important changes were made to RedisSessionsDelegate:

    1. makeNewID does not prefix the ID with vrs- anymore
    2. A new makeKey(for:) optional method has been added to the protocol to convert an ID to a RediStack.RedisKey to customize how the id is represented as a key.
      • The default implementation adds the vrs- prefix.

    👀 In addition, the protocol has seen two quality of life (breaking) changes to the required protocol methods:

    ⚡️ 1. Their argument labels have been updated to read a bit nicer at call sites, and the RedisKey is now passed instead of a SessionID

    • redis(_:storeData:forID:) -> redis(_:store:with:)
    • redis(_:fetchDataForID:) -> redis(_:fetchDataFor:)
      1. They have been marked @inlinable in the protocol definition. To take advantage of potential inlining, make sure you also mark your conformances with @inlinable.