#12671: Add set_many, delete_many, clear to cache --------------------------+------------------------------------------------- Reporter: jbalogh | Owner: nobody Status: new | Milestone: Component: Cache system | Version: 1.2-alpha Keywords: | Stage: Unreviewed Has_patch: 1 | --------------------------+------------------------------------------------- The attached patch adds all three, with accompanying tests and docs.
`set_many` and `delete_many` are convenient, but not really any big gain for non-memcached backends. For memcached, they're an improvement if you're setting or deleting a bunch of keys at once, since you avoid extra latency and network traffic. It also provides symmetry with `get_many`. `clear` is nice for tests and development when you need a full flush, and in production when there's a code upgrade that changes the shape of cached objects. I can split the patch into multiple, smaller patches if it makes things easier. I was in there and wanted all three, so I wrote everything at once. On the docs: the cache section is getting littered with `versionadded` directives, and the new methods might be getting kind of lost. A new "High Efficiency" section might be in order, to separate methods that act on a single key from methods that act on many keys (get_many, set_many, delete_many, and cache). Thoughts? Also, I'm not excited about continuing the (timeout=0 => default timeout) debacle, but it's better for consistency. -- Ticket URL: <http://code.djangoproject.com/ticket/12671> Django <http://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 post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.