简体   繁体   English

Web场中的内存映射文件C#

[英]Memory Mapping File C# in Web Farm

I have a web service developed in WCF and its deployed as a Web Farm(3 servers). 我有一个用WCF开发的Web服务,并将其部署为Web Farm(3个服务器)。 We are trying to implement caching using MemoryMappedFile. 我们正在尝试使用MemoryMappedFile实现缓存。 How does memory mapping behave in Web Farm. 内存映射在Web Farm中的行为如何。 Is there any option to manage the MemoryMappedFile across servers? 是否可以选择跨服务器管理MemoryMappedFile?

If you task is to do caching between servers, memory mapped file will not be good solution. 如果您的任务是在服务器之间进行缓存,那么内存映射文件将不是一个好的解决方案。

You can use proper caching solution like Redis for that. 您可以为此使用适当的缓存解决方案,例如Redis

You will also need c# library to communicate with Redis, you can use this one: https://servicestack.net/redis 您还需要c#库与Redis通信,您可以使用以下库: https : //servicestack.net/redis

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM