mirror-cache 0.0.3

A customizable reverse proxy with cache
import codecs
import time
import threading
import subprocess
import random
import requests
from multiprocessing import Pool

failed_count = 0
def make_requests(content, size):
    global failed_count
    r = requests.get(f'http://localhost:9000/debug/{content}/{size}')
    if not r.ok or r.text != f'{content}' * size:
        print(r.text)
        failed_count += 1

with Pool(4) as pool:
    task_size = 1000
    args_list = [('a', random.randint(1, 1024 * 1024)) for _ in range(task_size)]
    pool.starmap(make_requests, args_list)