Skip to content

Instantly share code, notes, and snippets.

@creative-link
creative-link / cache-warmer-3.sh
Created August 18, 2016 12:43 — forked from chales/cache-warmer-3.sh
A couple of simple options to parse sitemap.xml to warm the cache or for other actions such as generating memory_profiler checks.
# This can be added to your cron job to run right after Drupal's cron or combine them into a single command so
# that it automatically executes when the cron run completes.
wget -q http://www.example.com/sitemap.xml -O - | egrep -o "http://www\.example\.com[^<]+" | wget -q -i - -O /dev/null --wait 1
package main
import (
"encoding/json"
"errors"
"fmt"
"reflect"
"regexp"
"strconv"
"strings"