mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 23:45:07 +00:00
perf(api): stop rebuilding proxy catalogues, vaults and cdms per request
Cache proxy provider catalogues (10 min), reuse vaults and CDMs across one batch licence call, and cache the health update check, /api/services entries and parsed service config.yaml.
This commit is contained in:
@@ -4,7 +4,7 @@ import subprocess
|
||||
from typing import Optional
|
||||
|
||||
from unshackle.core import binaries
|
||||
from unshackle.core.proxies.proxy import Proxy
|
||||
from unshackle.core.proxies.proxy import Proxy, cached_catalogue
|
||||
|
||||
|
||||
class Hola(Proxy):
|
||||
@@ -71,6 +71,7 @@ class Hola(Proxy):
|
||||
|
||||
return random.choice(proxies) if proxies else None
|
||||
|
||||
@cached_catalogue
|
||||
def get_countries(self) -> list[dict[str, str]]:
|
||||
"""Get a list of available Countries."""
|
||||
p = subprocess.run(
|
||||
|
||||
Reference in New Issue
Block a user