MemoryCache.Plugin 5.7.0

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

// Install MemoryCache.Plugin as a Cake Tool
#tool nuget:?package=MemoryCache.Plugin&version=5.7.0                

This package is one of many packages that can be used with Plugin Manager which can be used to extend any c#/.net based application (MVC, Winform, WPF, MAUI etc) by using a Modular Approach.

Memory Cache Plugin

Even with the advent of faster solid state drives and quicker processors, there is no substitute to reading data from memory rather than from a database or other data store. Especially if the database is on a different server connected via the network, all of which add a slight delay in each step to obtaining and serving data to the end user.

The Memory Cache plugin is designed to provide access to several different types of cache which can be used to cache data and improve the speed at which requests are processed by keeping regularly used items or static data in memory.

There are advantages and disadvantages to caching data and a decision needs to be made on whether the data should be cached, the length of time it can be cached, how to ensure cached data does not go stale and managing the automatic expiration of cached data when it expires.

CacheManager is a class that is specifically designed to manage cached data in multiple, user defined caches, it employs a seperate background thread that is used to manage a CacheItem lifetime, as each CacheItem expires it is automatically removed from the CacheManager.

Short Cache

The first cache is the short cache, this has by default a 5 minute lifetime, although this can be changed to between 1 and 30 minutes. This cache should be used to store data that could go stale quite quickly, for instance pricing data or availability.

Default Cache

The default cache has a default lifetime of 2 hours but can also be configured to cache for between 30 and 480 minutes. This cache is designed to store data which is subject to less frequent changes such as Product data etc.

Extending Cache

The extending cache has the same settings as the default cache with one exception, every time an item is retrieved the expiration date is reset. This is useful if you want to keep regularly used data in memory.

Permanent Cache

The permanent cache is used to permanently store data in memory, the items in their will never expire. This can be useful to store data that requires fast lookups but never changes.

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 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.  net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (15)

Showing the top 5 NuGet packages that depend on MemoryCache.Plugin:

Package Downloads
ShoppingCartPlugin

Plugin Manager Shopping cart plugin for managing users checkout experience

SystemAdmin.Plugin

Plugin Manager display and manage system behaviours

Company.Plugin

Plugin Manager add generic company information to any website

ErrorManager.Plugin

Plugin Manager easily manage errors within a website

UserAccount.Plugin

Plugin Manager user account plugin

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.7.0 244 12/20/2024
5.6.1 422 6/12/2024
5.6.0 963 12/1/2023
5.5.2 677 11/25/2023
5.5.1 838 10/12/2023
5.5.0 731 10/9/2023
5.4.0 1,055 9/2/2023
5.3.0 905 7/30/2023
5.1.0 1,042 6/11/2023
5.0.3 2,859 11/24/2022
5.0.0 3,097 11/13/2022
4.4.0 5,077 4/22/2022
4.3.0 3,465 10/27/2021
4.2.0 3,387 8/3/2021
4.1.0 3,016 2/7/2021
4.0.0 3,382 10/6/2020
3.3.0 3,429 4/10/2020
3.2.0 3,313 1/9/2020
3.0.1 3,240 12/1/2019
3.0.0 3,225 10/13/2019
2.5.0 3,269 9/7/2019
2.4.0 3,263 7/25/2019
2.3.0 3,250 6/27/2019
2.2.0 2,813 6/15/2019
2.1.0 2,879 5/3/2019
2.0.0 2,389 4/7/2019
1.7.0 922 3/31/2019
1.6.0 739 2/23/2019
1.5.0 777 2/16/2019
1.4.0 781 2/4/2019
1.3.0 785 1/26/2019
1.2.0 838 1/6/2019
1.1.0 785 12/21/2018
1.0.14 1,654 11/12/2018
1.0.12 1,601 11/1/2018
1.0.0 1,574 10/10/2018

Supports net 6.0, net8.0 and net9.0