Last active
May 20, 2024 03:21
-
-
Save erikhansen/c1b88dce68c8cd76b042c1e1b82b0703 to your computer and use it in GitHub Desktop.
Revisions
-
erikhansen revised this gist
Mar 1, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ # This script crawls all urls in a /sitemap.xml file and loads them, effectively priming the cache # Usage: ./warm_cache.sh www.example.com time wget --quiet https://$1/sitemap.xml --output-document - | \ egrep -o "https?://[^<]+" | \ grep $1 | \ grep -v "jpg" | \ -
erikhansen created this gist
Mar 1, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/bash # This script crawls all urls in a /sitemap.xml file and loads them, effectively priming the cache # Usage: ./warm_cache.sh www.example.com time wget --quiet http://$1/sitemap.xml --output-document - | \ egrep -o "https?://[^<]+" | \ grep $1 | \ grep -v "jpg" | \ xargs -i -d '\n' curl --output /dev/null --silent --write-out '%{http_code} %{time_total}ms %{url_effective} \n' {}