Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/daniellarsennz/azurecacheredisclient

A Redis client library that incorporates best practices for Azure Cache for Redis.
https://github.com/daniellarsennz/azurecacheredisclient

azure azure-cache-redis microsoft redis redis-client

Last synced: about 5 hours ago
JSON representation

A Redis client library that incorporates best practices for Azure Cache for Redis.

Awesome Lists containing this project

README

        

# Azure Cache for Redis Client

Azure Cache for Redis client for .NET 6.0.

## Getting started

> For a more detailed example see [RedisCacheTests.cs](src\AzureCacheRedisClientTests\RedisCacheTests.cs).

```csharp
var cache = new RedisCache(connectionString);

var item = new TestItem { Name = "foo", Value = "bar" };

// Set cache item
await cache.Set("foobar1", item, TimeSpan.FromSeconds(90));

// Get cached item
var cachedItem = await cache.Get("foobar1");

// Deletes a specified key from the cache.
await cache.Delete("foobar1");
```