Fujiy Util NuGet Package

With this package you get data from cache or calling your method writing just one line of code.

Usually you do this(for ValueTypes, but Ref Types are similar):

decimal price;

var returnFromCache = Cache["CarClassGetPrice" + carId];

if(returnFromCache is decimal)
{
price = (decimal)returnFromCache;
}
else
{
price = GetPrice(carId);
Cache["CarClassGetPrice" + carId] = price;
}

With Fujiy.Util you just write:

decimal price = CacheHelper.FromCacheOrExecute(() => myObj.GetPrice(carId));.




Got any Fujiy Util Question?





Info

Version: 1.1.0
Author(s): Fujiy
Last Update: Thursday, August 7, 2014
.NET Fiddle: Create the first Fiddle
Project Url: http://blog.fujiy.net/
NuGet Url: https://www.nuget.org/packages/Fujiy.Util


Install
Install-Package Fujiy.Util
dotnet add package Fujiy.Util
paket add Fujiy.Util
Fujiy.Util Download (Unzip the "nupkg" after downloading)





STATS

must-have-score

avg-downloads-per-day

0

days-since-last-release

3730