diff --git a/.gitignore b/.gitignore index b9de93e59..081ed0847 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ official-eclipse-temurin library/ .vscode/ __pycache__/ +/adoptium_cache.sqlite diff --git a/generate_dockerfiles.py b/generate_dockerfiles.py index e3c32cf9e..8865a78a4 100644 --- a/generate_dockerfiles.py +++ b/generate_dockerfiles.py @@ -13,10 +13,13 @@ import os +import requests_cache import requests import yaml from jinja2 import Environment, FileSystemLoader +requests_cache.install_cache("adoptium_cache", expire_after=3600) + # Setup the Jinja2 environment env = Environment(loader=FileSystemLoader("docker_templates")) diff --git a/requirements.txt b/requirements.txt index 33c43e26b..bebb236fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Jinja2==3.1.3 PyYAML==6.0.1 Requests==2.31.0 +requests-cache==1.2.0