From c055c72b8f136822b6f5c54b58d27e186f863643 Mon Sep 17 00:00:00 2001 From: Martin van Es <martin@mrvanes.com> Date: Mon, 21 Feb 2022 12:19:07 +0100 Subject: [PATCH] Better terms for sign/request and cache --- mdproxy.py | 2 +- utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mdproxy.py b/mdproxy.py index a347364..93f1f7b 100755 --- a/mdproxy.py +++ b/mdproxy.py @@ -36,7 +36,7 @@ def serve(domain, eid): cached[domain] = cached.get(domain, {}) if entityID in cached[domain]: if cached[domain][entityID].expires > datetime.now(tz.tzutc()): - print(f"serve {entityID}") + print(f"cache {entityID}") return cached[domain][entityID].md print(f"request {entityID}") diff --git a/utils.py b/utils.py index 1e56299..fab98c0 100755 --- a/utils.py +++ b/utils.py @@ -140,6 +140,7 @@ class Resource: if sha1 in self.__dict__: signed_entity = self.__dict__[sha1] if signed_entity.expires > datetime.now(tz.tzutc()): + print(f"cache {sha1}") data = self.__dict__[sha1].md if data is None and sha1 in self.idps: @@ -162,5 +163,4 @@ class Resource: print(sha1) print(f" {e}") - print(f"serve {sha1}") return data -- GitLab