Skip to content

clear_dataset_cache#

Command#

Bases: BaseCommand

Source code in src/apps/core/management/commands/clear_dataset_cache.py
class Command(BaseCommand):
    def handle(self, *args, **kwargs):
        cache = caches["serialized_datasets"]
        if isinstance(cache, DummyCache):
            self.stderr.write("The serialized_datasets cache is not enabled")
            return
        cache.clear()
        self.stdout.write("Cleared serialized_datasets cache")