Skip to content

Instantly share code, notes, and snippets.

@pkdavies
Created November 22, 2018 13:33
Show Gist options
  • Save pkdavies/dbc70f2bedf9f2b6b5d57cb84a283e39 to your computer and use it in GitHub Desktop.
Save pkdavies/dbc70f2bedf9f2b6b5d57cb84a283e39 to your computer and use it in GitHub Desktop.
Cache warming script using siege
#!/bin/bash
rm sitemap.xml
wget -q https://www.CLIENT.com/sitemap.xml
sed '/<loc>/!d; s/[[:space:]]*<loc>\(.*\)<\/loc>/\1/' sitemap.xml > links.txt
siege -b -v -c 10 -f links.txt -r once -H 'Accept-Encoding: gzip' 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment