缓存 99% 的 MVC3 页面

发布于 2024-12-04 04:16:36 字数 161 浏览 4 评论 0原文

我的网站上有一个索引网页。 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人哭 2024-12-11 04:16:36

您可以在 斯科特·格思里的博客。 (搜索“部分页面输出缓存”)

You can read about partial-page output caching at Scott Guthrie's blog. (Search for "Partial Page Output Caching")

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文