Discussion: IDistributedCache - provision and questions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.6k
- Forks
- 595
- PR merge metrics
- No merged PRs in 30d
Description
For context, I'm on the devdiv / aspnet team and am currently probably the main owner of the caching story.
IDistributedCache is (at least in .NET 8) the main caching backend abstraction, with local-memory, Redis, SQLite, SQL Server, Cosmos, etc backends. I propose that FASTER should have such, and have prototyped it here. The good news is: it seems to work great, and the performance is 🔥
IDistributedCache is getting some love in .NET 9, so my eyes are on this area.
I have some thoughts from this, though:
- should MSFT provide an official implementation? if so, where should it live? I'm happy for you to take mine
- request for eyeballs; am I doing anything wrong/incomplete? in particular, things like "session length", and also: since I implement expiration, do I need to explicitly remove something, or is returning
falsefrom the functions layer enough to cause that to happen? - the serialization layer feels "old school"; there may be a lot of room for improvement there, to improve perf and reduce allocations and memory-copies; happy to have that discussion at length, but increasingly serializers are supporting
IBufferWriter<byte>andReadOnlySequence<byte>implementations; I'd love to have a conversation about that - also, stateless serializers rather than serializer factories
Let me know if there is interest from this from the FASTER side; if not, I can try to do my best from the "other side"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked FASTERCache prototype and the repository's existing cache abstractions. Then examine how expiration, session length, and the serialization layer are handled, including the questions about IBufferWriter and ReadOnlySequence. Done requires an agreed direction for an official IDistributedCache implementation and its serializer and expiration behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100