gpt4 book ai didi

ruby-on-rails - 部署时 "Warm Up Cache"

转载 作者:数据小太阳 更新时间:2023-10-29 06:33:19 26 4
gpt4 key购买 nike

我想知道是否有人有任何插件或 capistrano 配方可以通过在部署时或在本地部署之前构建所有页面缓存的 html 来“预热”rails 应用程序的页面缓存。

我有一些主要是静态的网站,它们变化不大,如果已经编写了 html,运行速度会更快,而不是要求一位访问者访问该网站。

与其自己创建它(看起来很简单,但它的优先级很低),它是否已经存在?

最佳答案

您可以使用 wget 或其他程序来抓取站点。事实上,这种场景在其手册页中被提及为一种用途:

This option tells Wget to delete every single file it downloads, after having done so. It is useful for pre-fetching popular pages through a proxy, e.g.:

   wget -r -nd --delete-after http://whatever.com/~popular/page/

The -r option is to retrieve recursively, and -nd to not create directories.

关于ruby-on-rails - 部署时 "Warm Up Cache",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/543961/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com