Skip to content

Instantly share code, notes, and snippets.

@kopitar
Forked from pkdavies/warm.sh
Created May 16, 2023 06:48
Show Gist options
  • Save kopitar/98697f96280fc97b34f67e6e452ba7de to your computer and use it in GitHub Desktop.
Save kopitar/98697f96280fc97b34f67e6e452ba7de 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