Skip to content

Instantly share code, notes, and snippets.

@mrl22
Last active February 22, 2022 12:17
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 mrl22/64aa879b91dc837555b17f3702be479c to your computer and use it in GitHub Desktop.
Save mrl22/64aa879b91dc837555b17f3702be479c to your computer and use it in GitHub Desktop.
Magento Cache Warmer without the expense of a warmer plugin

Dirty, but it works. You do not need to run it until it finishes, a few hundred requests should be good enough.

The purpose is to get all the main pages cached.

#!/usr/bin/bash
wget --directory-prefix=/tmp --spider --recursive --level=1 -nd \
--reject '*.js,*.css,*.ico,*.txt,*.gif,*.jpg,*.jpeg,*.png,*.mp3,*.pdf,*.tgz,*.flv,*.avi,*.mpeg,*.iso' \
--ignore-tags=img,link,script https://www.keengardener.co.uk/ 2>&1 | grep '^Saving to:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment