#29626: cache.backends.db does not implement delete_many()
------------------------------------------------+------------------------
Reporter: oliver | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Cache system) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Now delete_many() in core.backends.base.BaseCache is as follows.
{{{
def delete_many(self, keys, version=None):
"""
Delete a bunch of values in the cache at once. For certain
backends
(memcached), this is much more efficient than calling delete()
multiple
times.
"""
for key in keys:
self.delete(key, version=version)
}}}
And cache.backends.db does not implement delete_many()
So if i retrieve 100 entries from the db cache, 100 queries are executed
instead of just one
It should be fixed
This ticket is similar to https://code.djangoproject.com/ticket/29584
--
Ticket URL: <https://code.djangoproject.com/ticket/29626>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.bc0d48deebeedc85bf2e49ba2cc80dbc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.