Skip to content

Instantly share code, notes, and snippets.

@hgati
Created September 1, 2021 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgati/87877b51484b55e6b7c85de20d9a2c19 to your computer and use it in GitHub Desktop.
Save hgati/87877b51484b55e6b7c85de20d9a2c19 to your computer and use it in GitHub Desktop.
Website crawling for full page cache warmup
#!/usr/bin/env bash
## 파라미터가 없으면 종료
if [ "$#" -lt 2 ]; then
echo "$# is Illegal number of parameters."
echo "Usage: $0 https://www.example.com example.com"
exit 1
fi
wget \
--delete-after \
--no-directories \
--reject=txt,css,js,jpg,jpeg,gif,png,ico,svg,bmp \
--level=4 \
--recursive \
--domains=$2 \
--exclude-directories=/js/,/media/,/skin/ \
--server-response \
--no-cache \
$1 2>&1 | egrep -i '(^--|x-cache:)'
<<COMMENT1
이곳은 주석내용입니다.
COMMENT1
@hgati
Copy link
Author

hgati commented Sep 1, 2021

Be public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment