From 9819e38b08be8c8e2e072447eee994df495dae8b Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Mon, 5 Oct 2026 17:57:41 +0000 Subject: [PATCH] =?UTF-8?q?fix(ssr):=20verdrahte=20clear=5Fcache=20Hooks?= =?UTF-8?q?=20f=C3=BCr=20content/medialib/navigation/comment/tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SSR-Cache wurde nach PUT/POST/DELETE nicht geleert, /de lieferte alte Bilder. Return-Hooks nach sportident-Muster. --- api/collections/comment.yml | 12 ++++++++++++ api/collections/content.yml | 12 ++++++++++++ api/collections/medialib.yml | 18 ++++++++++++++++++ api/collections/navigation.yml | 18 ++++++++++++++++++ api/collections/tag.yml | 14 ++++++++++++++ 5 files changed, 74 insertions(+) diff --git a/api/collections/comment.yml b/api/collections/comment.yml index faa5349..159147f 100644 --- a/api/collections/comment.yml +++ b/api/collections/comment.yml @@ -34,6 +34,18 @@ hooks: read: type: javascript file: hooks/filter_public.js + post: + return: + type: javascript + file: hooks/clear_cache.js + put: + return: + type: javascript + file: hooks/clear_cache.js + delete: + return: + type: javascript + file: hooks/clear_cache.js indexes: - name: content_active diff --git a/api/collections/content.yml b/api/collections/content.yml index 8490a94..39b08a0 100644 --- a/api/collections/content.yml +++ b/api/collections/content.yml @@ -36,6 +36,18 @@ hooks: read: type: javascript file: hooks/filter_public.js + post: + return: + type: javascript + file: hooks/clear_cache.js + put: + return: + type: javascript + file: hooks/clear_cache.js + delete: + return: + type: javascript + file: hooks/clear_cache.js permissions: public: diff --git a/api/collections/medialib.yml b/api/collections/medialib.yml index f08f058..6f4218d 100644 --- a/api/collections/medialib.yml +++ b/api/collections/medialib.yml @@ -60,6 +60,24 @@ permissions: imageFilter: !include lib/imageFilter.yml +hooks: + get: + read: + type: javascript + file: hooks/filter_public.js + post: + return: + type: javascript + file: hooks/clear_cache.js + put: + return: + type: javascript + file: hooks/clear_cache.js + delete: + return: + type: javascript + file: hooks/clear_cache.js + search: - name: default mode: regex diff --git a/api/collections/navigation.yml b/api/collections/navigation.yml index 8ad8e7d..802934b 100644 --- a/api/collections/navigation.yml +++ b/api/collections/navigation.yml @@ -50,6 +50,24 @@ meta: - group: settings label: { de: "Einstellungen", en: "Settings" } +hooks: + get: + read: + type: javascript + file: hooks/filter_public.js + post: + return: + type: javascript + file: hooks/clear_cache.js + put: + return: + type: javascript + file: hooks/clear_cache.js + delete: + return: + type: javascript + file: hooks/clear_cache.js + permissions: public: methods: diff --git a/api/collections/tag.yml b/api/collections/tag.yml index 278b5f2..399b323 100644 --- a/api/collections/tag.yml +++ b/api/collections/tag.yml @@ -68,6 +68,20 @@ permissions: put: true delete: true +hooks: + post: + return: + type: javascript + file: hooks/clear_cache.js + put: + return: + type: javascript + file: hooks/clear_cache.js + delete: + return: + type: javascript + file: hooks/clear_cache.js + indexes: - name: name_unique key: