Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanvirarjel/tanvirarjel.extensions.microsoft.caching
This library extended the functionality of IDistributedCache interface to make the caching mechanism more easier.
https://github.com/tanvirarjel/tanvirarjel.extensions.microsoft.caching
Last synced: 1 day ago
JSON representation
This library extended the functionality of IDistributedCache interface to make the caching mechanism more easier.
- Host: GitHub
- URL: https://github.com/tanvirarjel/tanvirarjel.extensions.microsoft.caching
- Owner: TanvirArjel
- License: mit
- Created: 2020-10-01T07:14:19.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-14T16:48:41.000Z (about 2 years ago)
- Last Synced: 2024-11-04T04:18:51.110Z (11 days ago)
- Language: C#
- Size: 687 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TanvirArjel.Extensions.Microsoft.Caching
[![latest version](https://img.shields.io/nuget/v/TanvirArjel.Extensions.Microsoft.Caching)](https://www.nuget.org/packages/TanvirArjel.Extensions.Microsoft.Caching) [![preview version](https://img.shields.io/nuget/vpre/TanvirArjel.Extensions.Microsoft.Caching)](https://www.nuget.org/packages/TanvirArjel.Extensions.Microsoft.Caching/absoluteLatest) [![downloads](https://img.shields.io/nuget/dt/TanvirArjel.Extensions.Microsoft.Caching)](https://www.nuget.org/packages/TanvirArjel.Extensions.Microsoft.Caching)This library extended the functionality of `IDistributedCache` interface to make the caching mechanism more easier in .NET 5.0 and .NET Core.
## How do I get started
First install the lastest version of `TanvirArjel.Extensions.Microsoft.Caching` nuget package into your project as follows:
Install-Package TanvirArjel.Extensions.Microsoft.Caching
## Basic usageusing TanvirArjel.Extensions.Microsoft.Caching
// To set
Employee employee = new Employee
{
Id = 1,
Name = "Tanvir"
};
string cacheKey = "Employee1";
await _distributedCache.SetAsync(cacheKey, employee);
// To retrive
Employee = await _distributedCache.GetAsync(cacheKey);
# Available methods
1. `GetAsync()`
2. `SetAsync()` - 3 overloads
3. `AddToListAsync()` - 3 overloads
4. `AddToListAsync()` - 3 overloads
5. `UpdateInListAsync()` - 3 overloads
6. `UpdateInListAsync()` - 3 overloads
7. `RemoveFromListAsync()` - 3 overloads
# Bug(🐞) ReportDont forget to submit an issue if you face. we will try to resolve as soon as possible.
# Give a star (⭐)
**If you find this library useful to you, please don't forget to encouraging me to do such more stuffs by giving a star (⭐) to this repository. Thank you.**