alastairtree / LazyCache

An easy to use thread safe in-memory caching service with a simple developer friendly API for c#
https://nuget.org/packages/LazyCache
MIT License
1.72k stars 159 forks source link

Support dot net core #4

Closed alastairtree closed 5 years ago

alastairtree commented 8 years ago

Should we change our dependency on to Microsoft.Framework.Caching.Memory?

When dotnet core 2.1 releases a backwards compat version of system.runtime.caching will be available for netcore. It is available as prerelease now, see https://github.com/dotnet/corefx/issues/14529

burnchar commented 7 years ago

.NET Core and full .NET are likely to be used alongside each-other for years. Is it practical to support both caching methods?

artstalker commented 7 years ago

What about .net core support? Are you going to release dot net core version of this product?

Nucs commented 7 years ago

+1, netstandard makes it simpler.

bbrandt commented 7 years ago

The library to depend on now seems to be Microsoft.Extensions.Caching.Memory which is a .NETStandard 1.3 and .NETFramework 4.5.1 library.

alastairtree commented 7 years ago

Agree we want to make this netstandard at this point, and 1.3 would be a good place to aim for. Also worth looking at the memory/distributed options in dotnetcore as these also have nicer APIs than the old .net4 ones. See https://docs.microsoft.com/en-us/aspnet/core/api/microsoft.extensions.caching.memory https://docs.microsoft.com/en-us/aspnet/core/api/microsoft.extensions.caching.distributed

PureKrome commented 7 years ago

Any news on this?

Tersken commented 7 years ago

Any news?

matthewacme commented 7 years ago

I have a working version that is multi-targeted to net45, net46, and netstandard2.0 see #24

alastairtree commented 6 years ago

I have started work on this, and the basics are now working. Decided to target netstandard 2 and there are a number of breaking changes so this will be a major bump to version 2.0. Feel free to check out https://github.com/alastairtree/LazyCache/tree/feat/netcore2 if you are keen. Any feedback is welcome, and let me know if you think the breaking changes are unreasonable - I hope they should be very quick to fix. If you are really keen the latests nupkg is available at https://ci.appveyor.com/project/alastairtree/lazycache/build/artifacts but I think it still needs some work so not a proper release yet.

alastairtree commented 6 years ago

There is now a beta version of LazyCache 2.0 for netstandard 2 on nuget.org. Feedback most welcome.

dotnet add package LazyCache --version 2.0.0-beta02

In addition there are a set of dependency injection bindings available:

dotnet add package LazyCache.AspNetCore --version 2.0.0-beta02
alastairtree commented 6 years ago

Version 2.0.0-beta02 has been released to nuget.org with some minor refactorings and a new GetOrAdd method that allows the cache item factory/lamda define the cache duration/expiry at execution time rather than in advance, see #5 for an example.

lookingcloudy commented 6 years ago

Great - it looks like the beta version works with .Net Core 2.0.

AugustoDeveloper commented 6 years ago

It's very nice version, i'm using and it's so much fast.

matthewacme commented 6 years ago

Well done @alastairtree , hope my little contribution helped, we are converting over to use your "official" LazyCache in our core library (replacing my temp one).

TrevorVonSeggern commented 6 years ago

Are there any blockers for this issue to get resolved?

btw, great work on this!

alastairtree commented 6 years ago

Just published a final beta (3). Assuming no-one has any issues I can release in a few days. Also need to finish updating the docs to version 2.0. For those upgrading from version 0.7 I have added some upgrade docs at https://github.com/alastairtree/LazyCache/wiki/upgrade-to-2

avikenjale commented 6 years ago

Any idea by when can LazyCache.AspNetCore 2.0.0 final version release? Due to some reason, I am not allowed to use beta.

bradbamford commented 6 years ago

Final beta (3) was published in May (to be released in a days). Is there any reason that release didn't happen?

agltestshr commented 5 years ago

Would love to know when the final version will be released. I'm unfortunately not allowed to use the beta version. Thanks!

alastairtree commented 5 years ago

Quick note to say docs are updated, last few tweaks completed and final version 2.0.0 has been released to nuget.org. Sorry it took so long!

burnchar commented 5 years ago

Thank you for your efforts!