enable requests-cache

pull/1113/head
Chaz Larson 2 years ago
parent 853beb019f
commit 99fa53ecde

@ -3,6 +3,15 @@ from concurrent.futures import ProcessPoolExecutor
from datetime import datetime from datetime import datetime
from modules.logs import MyLogger from modules.logs import MyLogger
from requests_cache import install_cache
from datetime import datetime, timedelta
install_cache(
'config/http_cache',
expire_after=timedelta(days=1), # Otherwise expire responses after one day
allowable_methods=['GET', 'POST'], # Cache POST requests to avoid sending the same data twice
allowable_codes=[200],
match_headers=True,
)
try: try:
import plexapi, requests, schedule import plexapi, requests, schedule
from PIL import ImageFile from PIL import ImageFile

@ -3,6 +3,7 @@ tmdbapis==1.0.6
arrapi==1.3.1 arrapi==1.3.1
lxml==4.9.1 lxml==4.9.1
requests==2.28.1 requests==2.28.1
requests-cache==0.9.6
ruamel.yaml==0.17.21 ruamel.yaml==0.17.21
schedule==1.1.0 schedule==1.1.0
retrying==1.3.3 retrying==1.3.3

Loading…
Cancel
Save