diff --git a/django_ratelimit/checks.py b/django_ratelimit/checks.py index f6b76f4..50d2b81 100644 --- a/django_ratelimit/checks.py +++ b/django_ratelimit/checks.py @@ -22,6 +22,10 @@ @checks.register(checks.Tags.caches, 'django_ratelimit') def check_caches(app_configs, **kwargs): errors = [] + + if not getattr(settings, 'RATELIMIT_ENABLE', True): + return errors + cache_name = getattr(settings, 'RATELIMIT_USE_CACHE', 'default') caches = getattr(settings, 'CACHES', None) if caches is None: