From 92b9ce3b8bc8bd9794374a2e2bd3fcf9e7ed813d Mon Sep 17 00:00:00 2001 From: db0 Date: Mon, 16 Oct 2023 11:22:05 +0200 Subject: [PATCH] fix: add badge caching using queries --- fediseer/apis/v1/badges.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fediseer/apis/v1/badges.py b/fediseer/apis/v1/badges.py index 222e22a..9a06c18 100644 --- a/fediseer/apis/v1/badges.py +++ b/fediseer/apis/v1/badges.py @@ -8,6 +8,7 @@ from fediseer import enums class GuaranteeBadge(Resource): + @cache.cached(timeout=60, query_string=True) def get(self, domain): '''Retrieve Guarantee Badge SVG ''' @@ -37,6 +38,7 @@ class EndorsementBadge(Resource): get_parser.add_argument("style", required=False, default=enums.BadgeStyle.FULL.name, type=str, help=f"The style the text should take. 'FULL' (default) means icon, text and counter. 'ICON' means just icon and counter.", location="args") @api.expect(get_parser) + @cache.cached(timeout=60, query_string=True) def get(self, domain): '''Retrieve Endorsement Badge SVG '''