diff --git a/util/registry/torrent.py b/util/registry/torrent.py index d81caa162..ec93e1405 100644 --- a/util/registry/torrent.py +++ b/util/registry/torrent.py @@ -1,12 +1,13 @@ -import bencode import hashlib -import jwt -import resumablehashlib import time import urllib from cachetools import lru_cache +import bencode +import jwt +import resumablehashlib + from app import app, instance_keys @@ -14,6 +15,7 @@ ANNOUNCE_URL = app.config['BITTORRENT_ANNOUNCE_URL'] FILENAME_PEPPER = app.config['BITTORRENT_FILENAME_PEPPER'] REGISTRY_TITLE = app.config['REGISTRY_TITLE'] + @lru_cache(maxsize=1) def _load_private_key(private_key_file_path): with open(private_key_file_path) as private_key_file: