Skip to content

Instantly share code, notes, and snippets.

hongxy /
Created May 6, 2020 — forked from hn-support/
A threaded cache warmer in python
#!/usr/bin/env python
Warm the caches of your website by crawling each page defined in sitemap.xml.
To use, download this file and make it executable. Then run:
./ --threads 4 --file /data/web/public/sitemap.xml -v
import argparse
import multiprocessing.pool as mpool
import os.path
import re