This Python script is designed to warm up the cache on Fastly Content Delivery Network (CDN) by sending requests to a list of URLs. Warming the cache ensures that your content is readily available to users and can help improve website performance. Usually used after the deployment process.
Before using this script, make sure you have the following installed:
- Python 3.x
- The
curl
command-line tool (used for sending HTTP requests)
To use the script, follow these steps:
-
Clone this repository to your local machine:
git clone [email protected]:orozcodiaz/python-cache-warmer.git
or
git clone https://github.com/orozcodiaz/python-cache-warmer.git
-
Enter the folder:
cd python-cache-warmer/
-
Modify
url-list.txt
and run the code (don't forget to modify the target parameter):python3 cache-warmer.py --file="url-list.txt" --target="https://google.com/" --threads=10