asp.net-core.net-coresession-state-provider

Implementing Custom Session State Store Provider in dotnet core


I was just planning to implement a custom session state provider for a distributed cache product in .net core but I could not find SessionStateStoreProviderBase and related classes in dotnet core. Can somebody tell me where to find them?


Solution

  • Session is very different in ASP.NET Core. It's designed around IDistributedCache and takes the implementation from DI. https://github.com/aspnet/Caching/blob/rel/1.1.2/src/Microsoft.Extensions.Caching.Abstractions/IDistributedCache.cs