Created
December 5, 2012 19:52
-
-
Save fbrnc/4218909 to your computer and use it in GitHub Desktop.
Magento Cache Warming
This file contains 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 characters
for i in `cat tmp.urls` | |
do echo $i | |
URLHOSTNAME=`echo "$i" | sed -e 's@.*//\([^/]*\)/*.*@\1@'` | |
URLPATH=`echo "$i" | sed -e 's@.*//[^/]*\(/*.*\)@\1@'` | |
for varnish in 'varnish1hostname varnish2hostname'; do | |
curl -H "Accept-Encoding: gzip, deflate" -H "Host: ${URLHOSTNAME}" -s -X GET -I http://$varnish/$URLPATH | egrep 'HTTP/|Age:|X-Cache' | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment