I want to implement caching on a simple desktop application. And I am using WPF
.NET Framework. So, is Redis
cache could be effective considering the portability? Or is there any best option available?
I want to implement caching on a simple desktop application. And I am using WPF
.NET Framework. So, is Redis
cache could be effective considering the portability? Or is there any best option available?
3
Answers
I don’t suggest using
Redis
cache for the WPF desktop app. Why? it makes your application depends on a third-party app. it seems in.Net
there is a solution for caching in-memory and persisting on a file. You can find more about it on this LINKIf you need a cache for a simple solution, I suggest you use the InMemory cache. But if you are making a complex solution you should definitely consider a Distributed Cache (e.g. Distributed Redis Cache
), and the reason is that Distributed Cache is:
usually in a different location (e.g. Azure)
For more details for InMemory cache read
For more details for Distributed cache read
Memurai could be an option. It is a native Windows port of Redis.