From looking at the code through ILSpy , this is not possible. Because behind the scenes, GetHashCode() your key string is ultimately used.
I think the easiest way to do this is to implement a custom cache by expanding MemoryCache , which overrides all methods that interact with the key and calls ToUpperInvariant() , passing it as a parameter to the base call.
source share