Skip to content

Commit

Permalink
cronjobs: add daily clearing of identity cache
Browse files Browse the repository at this point in the history
* closes #2186
  • Loading branch information
jrcastro2 committed May 22, 2023
1 parent 342c9b0 commit 3b8aeda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions invenio_app_rdm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ def files_rest_permission_factory(obj, action):
)
],
},
# 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": timedelta(seconds=10),
},
}
"""Scheduled tasks configuration (aka cronjobs)."""

Expand Down
1 change: 1 addition & 0 deletions invenio_app_rdm/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import sqlalchemy as sa
from celery import shared_task
from invenio_cache import current_cache
from invenio_db import db
from invenio_files_rest.models import FileInstance

Expand Down

0 comments on commit 3b8aeda

Please sign in to comment.