PabloCache.MemoryCache 0.1.0-alpha

This is a prerelease version of PabloCache.MemoryCache.
dotnet add package PabloCache.MemoryCache --version 0.1.0-alpha                
NuGet\Install-Package PabloCache.MemoryCache -Version 0.1.0-alpha                
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="PabloCache.MemoryCache" Version="0.1.0-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PabloCache.MemoryCache --version 0.1.0-alpha                
#r "nuget: PabloCache.MemoryCache, 0.1.0-alpha"                
#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.
// 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 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. 
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
0.1.0-alpha 138 12/26/2023