EmfGlobalCaching 1.0.4
See the version list below for details.
dotnet add package EmfGlobalCaching --version 1.0.4
NuGet\Install-Package EmfGlobalCaching -Version 1.0.4
<PackageReference Include="EmfGlobalCaching" Version="1.0.4" />
paket add EmfGlobalCaching --version 1.0.4
#r "nuget: EmfGlobalCaching, 1.0.4"
// Install EmfGlobalCaching as a Cake Addin #addin nuget:?package=EmfGlobalCaching&version=1.0.4 // Install EmfGlobalCaching as a Cake Tool #tool nuget:?package=EmfGlobalCaching&version=1.0.4
appsettings.json dosyasına eklenecekler;
"CacheConfig": { "CacheProvider": "Redis", //"Memory" // or "Redis" "DefaultCacheDuration": "00:10:00" },
program.cs dosyasına eklenecekler;
services.Configure<CacheConfig>(configuration.GetSection("CacheConfig"));
services.AddMemoryCache(); services.AddStackExchangeRedisCache(options ⇒ { options.Configuration = configuration.GetValue<string>("Redis:Configuration"); options.InstanceName = configuration.GetValue<string>("Redis:InstanceName"); });
services.AddSingleton<MemoryCacheService>(); services.AddSingleton<RedisCacheService>(); services.AddSingleton<UserContext>(); services.AddSingleton<CacheManager>();
services.AddSingleton<ConnectionMultiplexer>(sp ⇒ { var config = ConfigurationOptions.Parse(configuration.GetValue<string>("Redis:Configuration"), true); return ConnectionMultiplexer.Connect(config); });
services.AddSingleton<ICacheService>(sp ⇒ { var config = sp.GetRequiredService<IOptions<CacheConfig>>().Value; return config.CacheProvider switch { "Redis" ⇒ sp.GetRequiredService<RedisCacheService>(), _ ⇒ sp.GetRequiredService<MemoryCacheService>(), }; }); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(CachingBehavior<,>));
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- EFGenericUnitOfWork (>= 1.0.18)
- MediatR (>= 12.3.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 8.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release with support for global caching using Memory Cache and Redis, integrated with MediatR, Entity Framework Core, Repository Pattern, UnitOfWork Pattern, and SoftDelete functionality.