缓存 99% 的 MVC3 页面
我的网站上有一个索引网页。 99% 的页面对于每个用户来说都是相同的。 1% 的不同是“欢迎约翰”或“欢迎托尼”的 div。我很想享受缓存的好处,但也想个性化页面。有什么办法可以用 MVC3 做到这一点吗?
例如,我可以只缓存页面的一部分而不是整个页面,以加快速度吗?
谢谢,
I have an index web page on my site. 99% of the page is the same for every user. The 1% different is the div that says "Welcome John" or "Welcome Tony". I would love to have the benefit of caching but also would like to personalize the pages. Is there any way I could do this with MVC3?
Can I for example just cache a partial part of the page rather than the whole page so as to speed things up?
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 斯科特·格思里的博客。 (搜索“部分页面输出缓存”)
You can read about partial-page output caching at Scott Guthrie's blog. (Search for "Partial Page Output Caching")