简体   繁体   English

ASP.NET应用程序的最佳缓存框架

[英]Best caching framework for asp.net application

I have an order system developed on asp.net 4 web forms. 我有一个在asp.net 4 Web表单上开发的订单系统。 I need to store order details (order object) for a user on the cache in order to manage it till I save it in the DB. 我需要在缓存上存储用户的订单详细信息(订单对象),以便对其进行管理,直到将其保存在数据库中为止。 I want to install my site at least on two server with option to scale for more in the future . 我想至少在两台服务器上安装我的站点,并可以选择将来扩展。 As you know , the two servers are located behind load balancer , so I need the cached order object to be shared on the both servers. 如您所知,这两个服务器位于负载均衡器的后面,因此我需要在两个服务器上共享缓存的订单对象。

I hear about App fabric. 我听说过App fabric。 Any recommendation to good frameworks to do that , Hope will be simple and easy to maintain one . 任何关于好的框架的建议,希望都是简单易维护的。 Thanks in advance ... 提前致谢 ...

I need to store order details (order object) for a user on the cache in order to manage it till I save it in the DB. 我需要在缓存上存储用户的订单详细信息(订单对象),以便对其进行管理,直到将其保存在数据库中为止。

If your data is not persisted, SQL Server-based Session state will work across machines on a per-user basis and can be configured with a minimum of fuss. 如果您的数据没有持久保存,则基于SQL Server的会话状态将在每台计算机上基于每个用户工作,并且可以配置得很少。

However, I would suggest regularly saving the order to your application database (not just the Session database) so that the user doesn't lose it. 但是,我建议定期将订单保存到您的应用程序数据库(而不仅仅是Session数据库)中,以使用户不会丢失订单。 This is fairly standard practice on e-commerce sites. 这是电子商务网站上相当标准的做法。 Unless the order process is very short, inevitably the user will want to pause and return, or accidentally close the browser, spill coffee into their computer, etc. 除非订购过程很短,否则用户将不可避免地要暂停并返回,或者不小心关闭浏览器,将咖啡倒入他们的计算机等。

Either way, the database makes a good intermediate and/or permanent location for this data. 无论哪种方式,数据库都可以为该数据提供良好的中间和/或永久位置。

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

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