ArkaSoftware.Extensions.Caching.Distributed.Redis 1.0.1

dotnet add package ArkaSoftware.Extensions.Caching.Distributed.Redis --version 1.0.1
                    
NuGet\Install-Package ArkaSoftware.Extensions.Caching.Distributed.Redis -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ArkaSoftware.Extensions.Caching.Distributed.Redis" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArkaSoftware.Extensions.Caching.Distributed.Redis" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ArkaSoftware.Extensions.Caching.Distributed.Redis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ArkaSoftware.Extensions.Caching.Distributed.Redis --version 1.0.1
                    
#r "nuget: ArkaSoftware.Extensions.Caching.Distributed.Redis, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ArkaSoftware.Extensions.Caching.Distributed.Redis@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ArkaSoftware.Extensions.Caching.Distributed.Redis&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ArkaSoftware.Extensions.Caching.Distributed.Redis&version=1.0.1
                    
Install as a Cake Tool

ArkaSoftware Redis Distributed Cache Extension

A professional, high-performance distributed caching extension built with Redis, designed specifically for use in .NET applications. Easy integration, clean architecture, and seamless performance make this package a must-have tool for developers.


🌟 Key Features

  • Easy Integration: Simple to use dependency injection extensions.
  • Flexible Configuration: Supports various configurations including JSON-based and inline setup.
  • High Performance: Built on top of StackExchange.Redis.
  • Clean Architecture: Follows best practices and principles of clean code.

🚀 Installation

Install via NuGet:

dotnet add package ArkaSoftware.Extensions.Caching.Distributed.Redis

⚙️ Configuration

Add Redis caching services easily via IServiceCollection:

Using Configuration File (appsettings.json)

"DistributedRedisCacheOptions": {
  "Configuration": "localhost:6379",
  "InstanceName": "SampleInstance"
}

Configure in Program.cs

services.AddArkaSoftwareRedisDistributedCache(Configuration, "DistributedRedisCacheOptions");

Inline Configuration

services.AddArkaSoftwareRedisDistributedCache(options => {
    options.Configuration = "localhost:6379";
    options.InstanceName = "SampleInstance";
});

📌 Usage

public class MyService
{
    private readonly ICacheAdapter _cacheAdapter;

    public MyService(ICacheAdapter cacheAdapter)
    {
        _cacheAdapter = cacheAdapter;
    }

    public void CacheData()
    {
        _cacheAdapter.Add("key", new { Value = "Data" }, DateTime.UtcNow.AddHours(1), null);

        var cachedData = _cacheAdapter.Get<object>("key");

        _cacheAdapter.RemoveCache("key");
    }
}

📂 Project Structure

ArkaSoftware.Extensions.Caching.Distributed.Redis
├── Extensions
│   └── DependencyInjection
│       └── DistributedRedisCacheServiceCollectionExtensions.cs
├── Options
│   └── DistributedRedisCacheOptions.cs
└── Services
    └── DistributedRedisCacheAdapter.cs

📦 csproj Metadata

Recommended metadata for your .csproj file to prepare for NuGet publishing:

<PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>

    <PackageId>ArkaSoftware.Extensions.Caching.Distributed.Redis</PackageId>
    <Version>1.0.0</Version>
    <Authors>ArkaSoftware</Authors>
    <Company>ArkaSoftware</Company>
    <Product>Redis Distributed Cache Adapter</Product>
    <Description>A Redis-based distributed caching extension for .NET applications, optimized for ease of use, performance, and clean architecture.</Description>
    <RepositoryUrl>https://github.com/your-repo</RepositoryUrl>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <PackageTags>redis;cache;distributed-cache;caching;dotnet;extensions</PackageTags>
    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
    <IncludeSymbols>true</IncludeSymbols>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


🏢 Maintained by

ArkaSoftware
📧 Email Us
🌐 Web Site Visit

© 2025 ArkaSoftware

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 172 4/25/2025