Distributed cache support
- Added support for distributed cache for session management
- For session management, B1SLayer will now use an in-memory cache implementation by default. Optionally, you can specify other implementations of
IDistributedCache
of your choosing, like in the example below:
- For session management, B1SLayer will now use an in-memory cache implementation by default. Optionally, you can specify other implementations of
using Microsoft.Extensions.Caching.Redis;
// Configures B1SLayer to use Redis as its distributed cache storage.
// This should be done on application startup before creating any SLConnection instances.
var redisCache = new RedisCache(new RedisCacheOptions
{
Configuration = "myRedisServer:6379"
});
B1SLayerSettings.DistributedCache = redisCache;
Breaking changes
- The method
LoginAsync
fromSLConnection
no longer has the optional parameterforceLogin
. Instead, a login request will always be performed when this method is called, regardless of the current session state.
Non-breaking changes
- Fixed an issue with the Ping request (#82)
- Added dependency on
Microsoft.Extensions.Caching.Abstractions
- Added dependency on
Microsoft.Extensions.Caching.Memory
- Added a direct reference to
System.Text.Json
version 6.0.11 to circumvent an existing vulnerability in version 6.0.4 (referenced by Flurl.Http)
Get it on NuGet: https://www.nuget.org/packages/B1SLayer/2.1.0
Full Changelog: 2.0.0...2.1.0