From 04817df22731c7f27af42ee5c9d17836dfe71113 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 25 Feb 2023 14:11:07 -0800 Subject: [PATCH] Log when cached_endpoint decorator is used. --- voussoirkit/flasktools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/voussoirkit/flasktools.py b/voussoirkit/flasktools.py index 5f63ed5..9b9b0f4 100644 --- a/voussoirkit/flasktools.py +++ b/voussoirkit/flasktools.py @@ -150,6 +150,8 @@ def cached_endpoint(max_age, etag_function=None, max_urls=1000): state.last_run = time.monotonic() return value + log.debug('Decorating %s with cached_endpoint.', function) + @functools.wraps(function) def wrapped(*args, **kwargs): # Should I use a threading.Lock to prevent two simultaneous requests