MichaCo / CacheManager

CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
http://cachemanager.michaco.net
Apache License 2.0
2.33k stars 456 forks source link

Redis performance problem #335

Closed huseyingoztok closed 3 years ago

huseyingoztok commented 3 years ago

I'm running CacheManager, Redis and .Net Core on a Linux server with docker. But there is a lot of time delay between Redis and Mem-Cached. The Mem-Cached version fetches the data in about 1 second, while the Redis configuration fetches in 4 seconds. I would be glad if you could help with this. My codes are like here. here.

MichaCo commented 3 years ago

I'm not sure how I can help you with this information. Most of the time reading or writing to Redis is spend in serialization usually. And, depending on how much you throw into one key, it'll take a long time. On top of that Redis has to send the data over the network. In-Memory doesn't do any of that, no serialization, no networking, hence it'll always be much faster.

I like your System.Text.Json serializer implementation btw ;)