PabloCache.MemoryCache
0.1.0-alpha
dotnet add package PabloCache.MemoryCache --version 0.1.0-alpha
NuGet\Install-Package PabloCache.MemoryCache -Version 0.1.0-alpha
<PackageReference Include="PabloCache.MemoryCache" Version="0.1.0-alpha" />
paket add PabloCache.MemoryCache --version 0.1.0-alpha
#r "nuget: PabloCache.MemoryCache, 0.1.0-alpha"
// Install PabloCache.MemoryCache as a Cake Addin #addin nuget:?package=PabloCache.MemoryCache&version=0.1.0-alpha&prerelease // Install PabloCache.MemoryCache as a Cake Tool #tool nuget:?package=PabloCache.MemoryCache&version=0.1.0-alpha&prerelease
PabloCache Memory Cache Implementation
The PabloCache Memory Cache Implementation extends the PabloCache component by providing a concrete implementation using Microsoft's Memory Cache. This implementation allows you to use an in-memory cache for your caching needs.
Installation
Install the PabloCache component and the Memory Cache Implementation using NuGet Package Manager
Usage
Configure Memory Cache in your IServiceCollection: Use the UseMemoryCache extension method to configure the memory cache within the IPabloCacheComponent:
public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddPabloCaching(component => { // Use the defualt configuration method component.UseMemoryCache(services); // Or use the overload with setup action component.UseMemoryCache(services, options => { // Configure options here }); }); } }
Inject and Use the Cache Service: You can now inject and use the ICacheService throughout your application, leveraging the memory cache functionality.
public class MyService { private readonly ICacheService _cacheService; public MyService(ICacheService cacheService) { _cacheService = cacheService; } // ... (use _cacheService in your methods) }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.0)
- PabloCache.Abstractions (>= 0.1.0-alpha)
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 |
---|---|---|
0.1.0-alpha | 138 | 12/26/2023 |