VersaTul.Caching 1.0.19

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package VersaTul.Caching --version 1.0.19                
NuGet\Install-Package VersaTul.Caching -Version 1.0.19                
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="VersaTul.Caching" Version="1.0.19" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VersaTul.Caching --version 1.0.19                
#r "nuget: VersaTul.Caching, 1.0.19"                
#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 VersaTul.Caching as a Cake Addin
#addin nuget:?package=VersaTul.Caching&version=1.0.19

// Install VersaTul.Caching as a Cake Tool
#tool nuget:?package=VersaTul.Caching&version=1.0.19                

VersaTul Caching

VersaTul Caching is a project that provides a simplified caching interface with the ability to change the underlying caching engine easily and quickly.

Features

  • Default cache engine based on Microsoft Extensions Caching Memory class
  • Ability to replace the cache engine with another provider
  • Cache configuration interface for accessing configuration settings
  • Cache provider interface for adding, retrieving, removing and checking cache entries

Installation

To install VersaTul Caching, you need to have .NET Core 3.1 or higher installed on your machine. You can download it from here.

To add VersaTul Caching to your project, you can use the NuGet package manager or the dotnet CLI.

Using NuGet:

  Install-Package VersaTul.Caching

Using dotnet CLI:

  dotnet add package VersaTul.Caching

Usage/Examples

To use VersaTul Caching, you need to create an instance of the cache provider and pass it the cache configuration. For example:

  using VersaTul.Caching;

  // Create a cache configuration with default settings
  ICacheConfiguration cacheConfig = new CacheConfiguration();

  // Create a cache provider with the default cache engine
  ICacheProvider<string> cacheProvider = new MemCacheProvider<string>(cacheConfig);

  // Add a cache entry with a key and a value
  cacheProvider.Add("key", "value");

  // Get a cache entry by its key
  string value = cacheProvider.Get("key");

  // Check if a cache entry exists by its key
  bool exists = cacheProvider.IsExists("key");

  // Remove a cache entry by its key
  cacheProvider.Remove("key");

You can also use a different cache engine by implementing the ICacheProvider interface and passing it to the cache provider constructor. For example:

  using VersaTul.Caching;

  // Create a custom cache engine that implements ICacheProvider
  public class CustomCacheProvider<T> : ICacheProvider<T>
  {
    // Implement the methods of the ICacheProvider interface
    // ...
  }

  // Create a cache configuration with custom settings
  ICacheConfiguration cacheConfig = new CacheConfiguration();
  cacheConfig.CacheDuration = 60; // Set the cache duration to 60 seconds

  // Create a cache provider with the custom cache engine
  ICacheProvider<string> cacheProvider = new CustomCacheProvider<string>(cacheConfig);

  // Use the cache provider as usual
  // ...

Documentation

For more information on VersaTul Caching, please refer to the official documentation.

License

VersaTul Caching is licensed under the MIT License.

Product 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. 
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
1.0.21 81 12/10/2024
1.0.20 87 11/12/2024
1.0.19 101 10/12/2024
1.0.18 127 4/5/2024
1.0.17 114 4/4/2024
1.0.16 112 4/4/2024
1.0.15 119 3/1/2024
1.0.14 126 2/1/2024
1.0.13 134 1/15/2024
1.0.12 123 1/11/2024
1.0.11 150 12/14/2023
1.0.10 200 10/14/2023
1.0.9 174 7/22/2023