Flaminco.CacheKeys 1.0.0

dotnet add package Flaminco.CacheKeys --version 1.0.0                
NuGet\Install-Package Flaminco.CacheKeys -Version 1.0.0                
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="Flaminco.CacheKeys" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Flaminco.CacheKeys --version 1.0.0                
#r "nuget: Flaminco.CacheKeys, 1.0.0"                
#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 Flaminco.CacheKeys as a Cake Addin
#addin nuget:?package=Flaminco.CacheKeys&version=1.0.0

// Install Flaminco.CacheKeys as a Cake Tool
#tool nuget:?package=Flaminco.CacheKeys&version=1.0.0                

Flaminco.CacheKeys

The Flaminco.CacheKeys This library provides a structured way to define cache keys, ensuring they are uniquely identifiable across different regions and optionally tagged for finer-grained categorization and retrieval.

Features

  • Region-based Segmentation: Define cache keys within specific regions to manage data more effectively across different contexts or locations.
  • Tagging Capability: Attach tags to cache keys for additional metadata, aiding in sorting, filtering, and identifying cache entries.
  • Implicit String Conversion: Use cache keys directly as strings for ease of integration with existing caching mechanisms.

Getting Started

Installation

To install the Flaminco.CacheKeys package, use the following command in the .NET CLI:

dotnet add package Flaminco.CacheKeys

Usage

 string dummyValue = await hybridCache.GetOrCreateAsync<string>(new CacheKey
 {
     Region = "Lookup", // Required
     Key = "Categories", // Required
     Tags = ["v1", "api"] // Optional
 }, async (x) =>
 {
     return "dummy category";
 }, tags: ["tag1", "tag2"]);

 // incase you need to remove all cached items by tag
 await hybridCache.RemoveTagAsync("v1");

Contribution

Contributions are welcome! If you have suggestions, bug reports, or contributions, please submit them as issues or pull requests on our GitHub repository.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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.
  • net7.0

    • No dependencies.

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.0 129 5/14/2024