dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.32k stars 9.97k forks source link

Sql Cache In-Memory OLTP? #28378

Closed dauger closed 3 years ago

dauger commented 9 years ago

Has having the option of using Sql Server 2014's in-memory OLTP instead of traditional tables been evaluated? It seems like it might be a good fit for a cache, but I'll admit that I have not done a deep dive on in-memory OLTP's capabilities & restrictions yet.

glennc commented 9 years ago

I don't think we have done any deep analysis on it. It's probably not a bad idea, but not something we have scheduled for our team at the moment.

twenzel commented 6 years ago

Is there any news on this topic? Someone has already implemented a prototype. Even a big player has already adopted this feature for caching.

yahorsi commented 5 years ago

Seems it might be perfect to use in memory oltp feature in ASP.NET Core Distributed Cache (SqlServer provider)

xantari commented 4 years ago

Here is my version of SQL In Memory table capable distributed cache implementation with only slight variations for your out of the box SQL Cache provider.

You can view it here: https://github.com/xantari/Microsoft.Extensions.Caching.SqlServerInMemory

ghost commented 3 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

davidfowl commented 3 years ago

This isn't something we plan to do but feel free to use the implementation from here https://github.com/dotnet/aspnetcore/issues/28378#issuecomment-598336464

xantari commented 3 years ago

@davidfowl Any chance of reconsidering? The only change you need to make to the SQL Server distributed cache provider you deliver today is to change from DateTimeOffset to DateTime2 at the database level and it would work for both in memory tables as well as physical storage based tables.

FYI, a full writeup of this issue is documented here: https://github.com/dotnet/aspnetcore/issues/17640

davidfowl commented 3 years ago

That sounds fine, but we don't test it, so we won't know when it breaks.