VOOZH about

URL: https://www.nuget.org/packages/Aj.DCache/

⇱ NuGet Gallery | Aj.DCache 1.0.34




Aj.DCache 1.0.34

dotnet add package Aj.DCache --version 1.0.34
 
 
NuGet\Install-Package Aj.DCache -Version 1.0.34
 
 
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="Aj.DCache" Version="1.0.34" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aj.DCache" Version="1.0.34" />
 
Directory.Packages.props
<PackageReference Include="Aj.DCache" />
 
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 Aj.DCache --version 1.0.34
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aj.DCache, 1.0.34"
 
 
#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 Aj.DCache@1.0.34
 
 
#: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=Aj.DCache&version=1.0.34
 
Install as a Cake Addin
#tool nuget:?package=Aj.DCache&version=1.0.34
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Aj.DCache

🚀 Aj.DCache é uma biblioteca .NET para gerenciamento de cache distribuído, construída sobre DragonflyDB (compatível com Redis) e projetada para ser segura, escalável e fácil de integrar em ambientes de alta concorrência.


✨ Funcionalidades

  • Suporte completo ao protocolo Redis, DragonflyDB e KeyDB
  • Operações padrão de cache distribuído (get/set/remove)
  • Suporte ao padrão Lazy Caching (GetOrCreate)
  • Evita duplicidade com SETNX (gravação segura)
  • Integração simples com ILogger (compatível com Serilog)
  • Preparado para lock distribuído usando RedLock
  • Estrutura enxuta e amigável para múltiplos projetos .NET
  • 100% thread-safe
  • Preparado para uso em multi-tenancy

📦 Instalação

via NuGet:

dotnet add package Aj.DCache

🚀 Primeiros passos

Configure no Program.cs ou Startup.cs:

builder.Services.AddAjDCacheServices(configuration);

Exemplo de uso do cache:

var result = await DistributedCacheHelper.GetOrCreateAsync<MyObject>(
 key: "meu-cache",
 factory: async () => await ObterDoBanco(),
 expiration: TimeSpan.FromMinutes(5)
);

⚙️ Configuração do Redis / Dragonfly

No seu appsettings.json:

"AjDCacheOptions": {
 "Server": "localhost:6379,password=suasenha",
 "Environment": "Production",
 "ExpirationTimeout": 300,
 "LockTimeout": 3,
 "PollyRetryPolicy": 3,
 "UseCompression": true,
 "DataBaseId":
}

🛠️ Dependências


✅ Roadmap

  • Implementar lock distribuído (Redlock)
  • Suporte a cluster multi-node
  • Benchmarks comparativos
  • Documentação avançada
  • Melhorias no suporte a multi-tenancy

🤝 Contribuindo

Pull requests são muito bem-vindos! Abra uma issue ou envie sugestões para evoluirmos juntos.


📄 Licença

🎯 Baixe o arquivo pronto no link abaixo:


Estrutra do Projeto


Aj.DCache
│
├── Configuration
│ └── AjDCacheOptions.cs
│
├── Extensions
│ └── MemoryCacheExtensions.cs
│
├── Helpers
│ └── CompressionHelper.cs
│ └── DistributedLockHelper.cs
│
├── Interfaces
│ └── IAjMemoryCache.cs
│
├── Model
│ └── CacheEntry.cs
│
├── Providers
│ └── AjMemoryCache.cs
│ └── DistributedCacheProvider.cs
│
└── Services
 └── RedisCacheService.cs

Resumo

  • Interfaces → apenas contratos (IAjMemoryCache, ILockProvider, etc)

  • Providers → implementações concretas desses contratos

  • Services → serviços de alto nível que coordenam regras

  • Helpers → utilitários

  • Extensions → métodos de extensão

  • Model → DTOs/POCOs


Product Versions Compatible and additional computed target framework versions.
.NET net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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 (1)

Showing the top 1 NuGet packages that depend on Aj.DCache:

Package Downloads
Aj.RabbitMQ.Core

Biblioteca .NET moderna para facilitar a integração de aplicações e microsserviços com RabbitMQ, incluindo suporte a padrões de Retry, Dead-Letter Queue, multi-tenant e envelopes padronizados de mensagens.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.34 301 6/5/2026
1.0.33 1,200 4/24/2026
1.0.32 1,141 3/20/2026
1.0.31 764 3/20/2026
1.0.30 854 3/11/2026
1.0.29 955 2/23/2026
1.0.28 1,429 1/26/2026
1.0.27 817 1/25/2026
1.0.26 807 1/25/2026
1.0.25 1,352 1/14/2026
1.0.24 841 1/14/2026
1.0.23 859 1/13/2026
1.0.22 820 1/13/2026
1.0.21 905 1/2/2026
1.0.20 553 11/26/2025
1.0.19 187 11/26/2025
1.0.18 199 11/24/2025
1.0.17 324 11/8/2025
1.0.16 301 11/4/2025
1.0.15 207 11/3/2025
Loading failed

Versão inicial do Aj.DCache com suporte a MemoryCache Local, Redis e DistributedCache Hibrido.