You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling BlockIP.objects.all() for every process_request can send "Too Many"™ database queries. And there's an existing TODO in the code to optimize it.
So, to correctly cache BlockIP querysets, django-block-ip should cache the queryset with no timeout, and rely on model signal handlers to update and delete the cache.
The text was updated successfully, but these errors were encountered:
Calling
BlockIP.objects.all()
for everyprocess_request
can send "Too Many"™ database queries. And there's an existingTODO
in the code to optimize it.(django-banish caches its Banishment queryset during middleware
init
, but it has a pretty serious bug withTIMEOUT
s.)So, to correctly cache
BlockIP
querysets, django-block-ip should cache the queryset with no timeout, and rely on model signal handlers to update and delete the cache.The text was updated successfully, but these errors were encountered: