Cache for ASP.NET Core Sessions
NCache is a very feature-rich and versatile software. It provides support for various features of ASP.NET Core. You can store ASP.NET Core sessions using the enhanced features of NCache. SignalR can be configured and utilized in ASP.NET Core applicat
ASP.NET Core Sessions: NCache has introduced ASP.NET Core sessions State Management for ASP.NET Core to provide support with the new architecture. NCache provides flexible options to combine ASP.NET Core sessions with enhanced NCache caching capabilities, to boost performance as a whole.
SignalR: SignalR allows developers to create real-time ASP.NET Core web applications, where the server broadcasts the updates to all registered clients as soon as an update is triggered. NCache extends the ISignalRServerBuilder method with its
AddNCache
method which requires just the cache name, event key, and user credentials for the item added.Response Caching: ASP.NET Core provides response caching which allows you to cache the server response of a client request for future requests.
Note
For .NET installation, the minimum required version is 6.0.
ASP.NET Core Sessions: NCache Demonstration Using Sample Application
You can view the sample application for all the features above on GitHub. In this section, we will show you how to use the sample application for ASP.NET Core Response Caching in NCache.
Note
The following steps are same for all of the other features.
Step 1: Download Sample from GitHub
To get started with ASP.NET Core Response Caching, download the sample application from GitHub and go to the desired sample.
Step 2: Launch the Project
Launch the ASP.NET Core Response Caching sample application in Microsoft Visual Studio 2022 or above by clicking on ResponseCaching.sln.
Step 3: Configure Settings
Once you have launched the project, locate and open appsettings.json from the solutions explorer to your right. Change the cache name attribute to the cache which have been created.
Step 4: Build and Run Sample
Once the application settings have been configured, build the application. Once the application has been built successfully, the application will start running inside a new window on your web browser. You will be able to test the application there.
See Also
Use NCache for .NET Core Caching Use NCache for Java Application