Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are you planning a disk-backed cache? #120

Open
tomcrane opened this issue Apr 28, 2020 · 16 comments
Open

Are you planning a disk-backed cache? #120

tomcrane opened this issue Apr 28, 2020 · 16 comments
Labels
ASP.NET Schedule Type: Idea This issue is a high-level idea for discussion.
Milestone

Comments

@tomcrane
Copy link

This question is related to #109 and replacing ARR. Will reverse proxy caching be on the roadmap? Like ARR (or Varnish)?

@tomcrane tomcrane added the Type: Discussion This issue is a discussion thread and doesn't currently represent actionable work. label Apr 28, 2020
@Tratcher
Copy link
Member

Nothing specific in the plans yet.

AspNetCore already has an in-memory response cache that should be proxy compatible (it keys off response cache headers). Someone could probably adapt it to use disk storage, though the concurrency model would be trickier.

Why a disk-backed cache specifically? Capacity?

@analogrelay
Copy link
Contributor

It’s fair to say it’s something on our mind though. Not on the plans for 1.0 but it should be possible to do it via the extensibility points in 1.0, and we can look at it after the first version is solid.

@tomcrane
Copy link
Author

Thanks. Yes, it's capacity - apps that can potentially generate 100s of GBs of highly cacheable content, that today you would (if you didn't fancy a CDN) stick IIS+ARR+cache, or Varnish, or NGINX Content Caching in front of.

Would be lovely to just add app.UseSuperDiskCache() or whatever. Sounds like with reverse-proxy as a toolbox it should be easier to make a disk-backed cache, but it's the kind of thing I'd much rather use something ready-made.

Really excited by this project, btw!

(What's the etiquette here - I close the issue as answered?)

@samsp-msft samsp-msft added Future Feature (unscheduled) and removed Type: Discussion This issue is a discussion thread and doesn't currently represent actionable work. labels Apr 28, 2020
@analogrelay
Copy link
Contributor

Let’s leave this open to track further caching work. We’ll put it in our post-1.0 backlog though.

@analogrelay analogrelay added this to the Backlog milestone Apr 28, 2020
@fractos
Copy link

fractos commented Jun 17, 2020

Having the option to be disk-based would really open up a lot of use cases, I believe. E.g. an integrated, disk-based cache inside a .Net Core app means fewer moving parts for a container stack. Also means you can apply logic and smarts to it locally instead of being split between the app and whatever process is doing the caching. Stretch goal for 1.0?

@karelz
Copy link
Member

karelz commented Jun 17, 2020

Currently, this is not critical for 1.0. As mentioned above, once the core functionality is solid, we can prioritize it with other feature requests.

@AlgorithmsAreCool
Copy link

Nothing specific in the plans yet.

AspNetCore already has an in-memory response cache that should be proxy compatible (it keys off response cache headers). Someone could probably adapt it to use disk storage, though the concurrency model would be trickier.

Why a disk-backed cache specifically? Capacity?

@Tratcher At a high level, would someone need to just wire up an implementation of IDistributedCache to make this work? (for experimentation anyway)

@Tratcher
Copy link
Member

Tratcher commented Nov 9, 2021

The response caching middleware linked above caches in-memory. You could certainly fork that to prototype caching to disk. AspNetCore already has FileBufferingWriteStream that would be useful here.
https://github.com/dotnet/aspnetcore/blob/47e21d4849cc6cb88fc9ca9c95054add1261e312/src/Http/WebUtilities/src/FileBufferingWriteStream.cs#L20

@AlgorithmsAreCool
Copy link

Hmm, I'm gonna try to carve a little time to spike an implementation using FASTER KV for small to medium size responses.

Notes for myself...

@karelz karelz added Type: Idea This issue is a high-level idea for discussion. and removed Type: Future Feature (unscheduled) labels Jan 10, 2022
@Tratcher
Copy link
Member

RE: dotnet/aspnetcore#40229

@nixtar
Copy link

nixtar commented Jun 27, 2022

RE: dotnet/aspnetcore#40229

Nooo, it appears its been pushed to dotnet 8 😢😢.
That's quite catastrophic to our tentative roadmap.

Back to IIS+ARR/nginx we go 😭.

@maknapp
Copy link

maknapp commented Feb 28, 2023

Note that dotnet/aspnetcore#40229 is for output caching, not response caching. These are two separate things - output caching ignores cache-control headers.

I do not see any plans to add data storage options for response caching.

@adityamandaleeka
Copy link
Member

cc @sebastienros

@Xhanti
Copy link

Xhanti commented Mar 25, 2024

Some movement here:
microsoft/FASTER#902

@mgravell
Copy link

@Xhanti probably a bit premature to get too excited there, but yes; I hope we can get a FASTER-backed local-machine larger-than-RAM cache engine suitable for distributed cache, output cache, and whatever else people might want

@Xhanti
Copy link

Xhanti commented Mar 25, 2024

@mgravell understood. Early days, but even if you MS does not proceed and support it, the work you've contributed here is a good jumping off point for the next person. I am also inordinately excited for this body of work :) .This is a problem I have been thinking about for some time now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASP.NET Schedule Type: Idea This issue is a high-level idea for discussion.
Projects
None yet
Development

No branches or pull requests