网络爬虫生成输出缓存

发布于 2024-10-06 14:08:57 字数 365 浏览 1 评论 0原文

我实现了:

<%@ OutputCache Duration="43200" VaryByParam="none" location="Server" VaryByCustom="RawURL" %>

我有一个 sitemap.xml,其中包含我网站中可能的所有 url(大约 12000)。

我想知道创建一个应用程序来解析我的站点地图是否明智 为了请求所有网址?

目标是缓存我的所有网站以提高速度。

我精确地回答了我的问题:

每个页面创建大约需要 10 秒,缓存持续时间和缓存持续时间为 12 小时

I implemented :

<%@ OutputCache Duration="43200" VaryByParam="none" location="Server" VaryByCustom="RawURL" %>

I have got a sitemap.xml with all url(about 12000) possible in my site.

I would know if it's judicious to create an application that will parse my sitemap in
order to request all url?

The Goal is caching all my web site to increase velocity.

I precise my question :

Each page take about 10 sec to be created and the cache duration and cache duration is 12 hours

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

娇女薄笑 2024-10-13 14:08:57

如果动态创建任何一个单独页面的时间相对较快,那么您可能不会通过这样做获得太多收益。

也许您最好将输出缓存保留在适度的时间限制(5 - 15 分钟),以避免使用大量内存,并保持页面新鲜(除非您有一个很好的方法来使输出缓存每次过期)页面已更新)。如果一个页面足够受欢迎,可以被频繁访问,那么当人们访问它时,它很可能会被缓存。

If the time to dynamically create any one individual page relatively fast, then you probably would not be gaining much by doing this.

Probably you are better just leaving the output cache at a modest time limit (5 - 15 minutes) to avoid using a lot of ram, and also to keep the pages fresh (unless you have a good way of expiring the output cache each time a page is updated). If a page is popular enough to be accessed frequently, it will most likely be cached when a person goes to it.

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