Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 usage

using 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(🐞) Report

Dont 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.**