简体   繁体   English

在多个工作进程之间使用 ASP.NET 应用程序中的 HttpContext.Cache 共享数据?

[英]Sharing data using HttpContext.Cache within a ASP.NET application between multiple worker processes?

Is it possible to share an object between worker processes using the HttpContext.Cache ?是否可以使用HttpContext.Cache在工作进程之间共享 object ? If not is there an alternative method to sharing data between processes?如果没有,是否有其他方法可以在进程之间共享数据?

No, it's not possible.不,这是不可能的。 One way of sharing objects would be using session in database strategy.共享对象的一种方法是在数据库策略中使用 session。 Here you have a link with some info about storing the session in the database在这里,您有一个链接,其中包含有关在数据库中存储 session 的一些信息

Another option would be using a distributed cache like memcached or AppFabric.另一种选择是使用分布式缓存,如 memcached 或 AppFabric。

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

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