Skip to content

The purpose of this library is to store cache data, the infrastructure "StackExchange.Redis" is fed, but this library offers more generic and clean architecture. This library was developed .NET Standard.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

ferhatcandas/TStack.RedisExchange

Repository files navigation

Overview

The purpose of this library is to store cache data, the infrastructure "StackExchange.Redis" is fed, but this library offers more generic and clean architecture. This library was developed .NET Standard.

Covarage

  • StringSet
  • SortedSet
  • Set

Installation

Nuget Package

Package Manager

Install-Package TStack.RedisExchange -Version 1.0.3

.NET CLI

dotnet add package TStack.RedisExchange --version 1.0.3

PackageReference

<PackageReference Include="TStack.RedisExchange" Version="1.0.3" />

Paket CLI

paket add TStack.RedisExchange --version 1.0.3

Usage

This library supports cluster mode, for usage follow steps.

Step One

Define Redis Context Config

public class RedisContext : RedisContextConfig
{
    public RedisContext() : base(new List<RedisServer> { new RedisServer("localhost", 6379)}, "", "ClientName", 15000, 15000)
    {

    }
}

Step Two

Define Provider

public class ProjectProvider : RedisProvider<RedisContext>
{

}

Ready to use.

Fundamentals

All redis functions need a key parameter for keep data, so you can access with this data from cache from key parameter.

An example for StringSet

ProjectProvider _provider = new ProjectProvider();
Person person = new Person("ferhat","candas");
var expire = new TimeSpan(0, 0, 5);
provider.Add("stringsetkey", person, expire);

For more example, than look tests

Author

Ferhat Candaş - Software Developer

About

The purpose of this library is to store cache data, the infrastructure "StackExchange.Redis" is fed, but this library offers more generic and clean architecture. This library was developed .NET Standard.

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages