Issues with Memory Cache TryGetValue always returns false

Question: Hello, I have verified that the Set Method on the Memory Cache actually sets the key and value, however when I try to retrieve the value using the same key used when Caching the object, the TryGetValue returns false.

What could be going on?


Please Login to see the rest of the answer

Answer: Verify that the Key you are using to Cache an object does not contain characters such as "-","@" or '%', I found out that when the Key has characters the Cache System does not work, if possible stripe all the characters from the key and try to Cache again.

I hope this helps you, if it does leave a comment below you don't have to log in to leave a comment.


Write an Article
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy