Skip to content

Instantly share code, notes, and snippets.

@hongxy
hongxy / cache-warmer.py
Created May 6, 2020 — forked from hn-support/cache-warmer.py
A threaded cache warmer in python
View cache-warmer.py
#!/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:
./cache-warmer.py --threads 4 --file /data/web/public/sitemap.xml -v
"""
import argparse
import multiprocessing.pool as mpool
import os.path
import re
You can’t perform that action at this time.