Cache regenerator

Public

Requires XML sitemap module (http://drupal.org/project/xmlsitemap)
The code allows you to create cache for all pages contained in your xml sitemap.

</> CopyGet raw version
bash
  1. #!/bin/bash
  2. # Drupal cron
  3. wget -O - -o /dev/null http://example.com/cron.php?cron_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  4. # Visit every page from your sitemap.xml
  5. wget --quiet http://example.com/sitemap.xml --output-document - | egrep -o "http://example.com/[^<]+" | wget -q --delete-after -i -

Comments

Lasse's picture

This won't work for sites using gzip, at least not to warm a varnish cache.