Skip to content

Commit

Permalink
Add clear_redis_cache management command
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Jan 11, 2024
1 parent e4b21ad commit ff2601c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Fix
---
- Correctly clear ``Redis`` cache on data restart

Add
---
- Add ``clear_redis_cache`` management command


===================
38.2.0 - 2023-12-15
Expand Down
23 changes: 23 additions & 0 deletions resolwe/flow/management/commands/clear_redis_cache.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
""".. Ignore pydocstyle D400.
=================
Clear Redis Cache
=================
Clear all the Redis Cache.
"""


from django.core.management.base import BaseCommand

from resolwe.flow.managers.listener.redis_cache import redis_cache


class Command(BaseCommand):
"""Run the executor listener."""

help = "Clear Redis cache."

def handle(self, *args, **options):
"""Clear the Redis cache."""
redis_cache.clear()

0 comments on commit ff2601c

Please sign in to comment.