Open slint opened 5 years ago
An ad-hoc fixture has been placed in invenio-record-resources, invenio-vocabularies and invenio-rdm-records, remove from there when fixing this issue:
@pytest.fixture()
def cache():
"""Empty cache."""
try:
current_cache.clear()
yield current_cache
finally:
current_cache.clear()
It would be useful to have
invenio-cache
(or Redis) fixtures to be able to:CACHE_KEY_REFIX
FLUSHALL
)Another interesting alternative is specifying a custom
CACHE_KEY_PREFIX
for testing (e.g.'tests::cache::'
) and clear only this one.