Fujiy.Util 1.1.0

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;
   price = GetPrice(carId);
   Cache["CarClassGetPrice" + carId] = price;

With Fujiy.Util you just write:

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

Install-Package Fujiy.Util -Version 1.1.0
dotnet add package Fujiy.Util --version 1.1.0
<PackageReference Include="Fujiy.Util" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fujiy.Util --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Version 1.1.0
* Support for Task results. Ignores cached Tasks if Status is Faulted or Canceled


This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 646 8/7/2014
1.0.0 524 4/1/2014