Cacheyi 6.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Cacheyi --version 6.0.1
NuGet\Install-Package Cacheyi -Version 6.0.1
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="Cacheyi" Version="6.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cacheyi --version 6.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cacheyi, 6.0.1"
#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 Cacheyi as a Cake Addin
#addin nuget:?package=Cacheyi&version=6.0.1
// Install Cacheyi as a Cake Tool
#tool nuget:?package=Cacheyi&version=6.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Cacheyi
Cacheyi is a micro cache management library, by fluent API.
Configuration settings of cache context.
public class HogeCacheCenter : CacheCenter
{
public ICacheStore<string, int> Hoges { get; set; }
protected override void ConstructStore(CacheStoreDirector director)
{
var i = 0;
director.Build(() => this.Hoges)
.Settings(x =>
{
x.Timeout = TimeSpan.FromSeconds(3);
x.MaxCapacity = 10;
})
.GetValue(x =>
{
return ++i;
});
}
}
or
public class HogeCacheCenter
{
public HogeCacheCenter()
{
CacheCenter.ConstructStore(this, director =>
{
director.
Build(() => Products).
Settings(settings =>
{
settings.Timeout = TimeSpan.FromSeconds(3);
settings.MaxCapacity = 10;
}).
GetValue(key => new Product
{
return ++i;
});
});
}
public ICacheStore<string, int> Hoges { get; private set; }
}
Get Cache
var cacheCenter = new HogeCacheCenter();
var cache = cacheCenter.Hoges.Alloc("hogehoge");
var value = hogeCache.GetValue();
Example
static void Main(string[] args)
{
{
var cacheCenter = new HogeCacheCenter();
var hogeCache = cacheCenter.Hoges.Alloc("hogehoge");
Console.WriteLine(hogeCache.GetValue());
// Get new value : 1
}
System.Threading.Thread.Sleep(1000);
{
var cacheCenter = new HogeCacheCenter();
var hogeCache = cacheCenter.Hoges.Alloc("hogehoge");
Console.WriteLine(hogeCache.GetValue());
// Get cache value : 1
}
System.Threading.Thread.Sleep(2100);
{
var cacheCenter = new HogeCacheCenter();
var hogeCache = cacheCenter.Hoges.Alloc("hogehoge");
Console.WriteLine(hogeCache.GetValue());
// Get new value after timeout : 2
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net6.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 |
---|---|---|
6.0.2 | 879 | 10/5/2022 |
6.0.2-alpha.4 | 112 | 3/15/2022 |
6.0.2-alpha.3 | 97 | 3/13/2022 |
6.0.2-alpha.2 | 111 | 2/19/2022 |
6.0.2-alpha.1 | 132 | 12/11/2021 |
6.0.1 | 881 | 11/9/2021 |
5.0.0 | 988 | 2/8/2021 |
3.2.4 | 1,057 | 6/23/2020 |
3.2.3 | 1,095 | 6/19/2020 |
3.2.2 | 1,088 | 2/29/2020 |
3.1.0 | 1,057 | 2/25/2020 |
3.0.0 | 1,116 | 9/25/2019 |
2.5.0 | 1,596 | 7/3/2019 |
2.4.0 | 1,165 | 6/20/2019 |
2.3.0 | 1,587 | 5/11/2018 |
2.2.0 | 1,577 | 4/28/2018 |
2.1.0 | 1,862 | 9/18/2017 |
1.0.0 | 2,196 | 3/10/2016 |