From f51fddd441945350268f2c22299eb6ada9c0b764 Mon Sep 17 00:00:00 2001 From: Javier Romero Castro Date: Wed, 17 May 2023 17:02:10 +0200 Subject: [PATCH] cronjobs: add daily clearing of identity cache * closes https://github.com/inveniosoftware/invenio-app-rdm/issues/2186 --- invenio_app_rdm/config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/invenio_app_rdm/config.py b/invenio_app_rdm/config.py index a9233507f..f4af03941 100644 --- a/invenio_app_rdm/config.py +++ b/invenio_app_rdm/config.py @@ -365,6 +365,12 @@ class UserPreferencesNotificationsSchema(UserPreferencesSchema): ) ], }, + # Invenio communities provides some caching that has the potential to be never removed, + # therefore, we need a cronjob to ensure that at least once per day we clear the cache + "clear-cache": { + "task": "invenio_communities.tasks.clear_cache", + "schedule": crontab(minute=0, hour=1), # Every day at 01:00 UTC + }, } """Scheduled tasks configuration (aka cronjobs)."""