#35039: Redis cache.clear() should respect KEY_PREFIX
-------------------------------------+-------------------------------------
     Reporter:  Peter Baumgartner    |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Core (Cache system)  |                  Version:  4.2
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  cache redis          |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * type:  Bug => New feature
 * resolution:   => wontfix


Comment:

 This behavior is consistent with other backends and is
 
[https://docs.djangoproject.com/en/stable/topics/cache/#django.core.cache.cache.clear
 documented] so it's not a bug:

 > ''"Be careful with this; clear() will remove **everything** from the
 cache, not just the keys set by your application"''

 We agreed in #33012 to keep the builtin Redis backend minimal and
 consistent with other backends. It looks like you should use `django-
 redis` for your use case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35039#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018c6bc72f30-bdc07baf-f45e-448a-a4e3-34efd92c43c1-000000%40eu-central-1.amazonses.com.

Reply via email to