I'm working on Janky in C#, and I have a JankyToken class. I'm gonna be making a lot of JankyTokens, so I need to know, how can I make a method (Cr...
For further actions, you may consider blocking this person and/or reporting abuse
This is a simple implementation of cache.
If you use threads, then better use Concurrent Dictionary.
docs.microsoft.com/dotnet/api/syst...
For example:
What if I want to retain the original value(s) of the parameters, like Python's LRU cache?
I'm not good at Python, but if I understood you correctly, you have need retain Type type and string val into cache. In this case you can define a new class and implements properties for these params or use Tuple types.
ASP.NET Core or .NET 5 have ready implementation of cache
For example
Or for C# 9
Okay. Thanks for your help.