#32785: Reduce culling frequency of database cache backend
--------------------------------------+------------------------------------
     Reporter:  Mike Lissner          |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Core (Cache system)   |                  Version:  dev
     Severity:  Normal                |               Resolution:
     Keywords:  cache, database       |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Comment (by regiov):

 I'm also interested in this kind of improvement, but my use case has a
 much simpler solution. Since I'm erasing the whole cache externally
 depending on certain conditions, both my TIMEOUT and MAX_ENTRIES can be
 None, meaning the DELETE statement is never run. However, SELECT count(*)
 still gets called unnecessarily on every addition to the cache. A simple
 condition to check if MAX_ENTRIES is not None before counting records
 would be enough for my use case. I just don't know if you guys prefer a
 more general solution that could address a broader set of use cases.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/32785#comment:3>
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/0107018d6a490bb6-15733be3-91cf-4bec-ac3c-f6a347015836-000000%40eu-central-1.amazonses.com.

Reply via email to