def delete_multi(self, keys, time=<NUM_LIT:0>, key_prefix='<STR_LIT>'):
self._statlog('<STR_LIT>')<EOL>server_keys, prefixed_to_orig_key = self._map_and_prefix_keys(keys, key_prefix)<EOL>dead_servers = []<EOL>rc = <NUM_LIT:1><EOL>for server in server_keys.keys():<EOL><INDENT>bigcmd = []<EOL>write = bigcmd.append<EOL>if time != None:<EOL><INDENT>for key in server_keys[server]: <EOL><INDENT>write("<STR_LIT>" % (key, time))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for key in server_keys[server]: <EOL><INDENT>write("<STR_LIT>" % key)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>server.send_cmds('<STR_LIT>'.join(bigcmd))<EOL><DEDENT>except socket.error as msg:<EOL><INDENT>rc = <NUM_LIT:0><EOL>if isinstance(msg, tuple): msg = msg[<NUM_LIT:1>]<EOL>server.mark_dead(msg)<EOL>dead_servers.append(server)<EOL><DEDENT><DEDENT>for server in dead_servers:<EOL><INDENT>del server_keys[server]<EOL><DEDENT>for server, keys in server_keys.items():<EOL><INDENT>try:<EOL><INDENT>for key in keys:<EOL><INDENT>server.expect("<STR_LIT>")<EOL><DEDENT><DEDENT>except socket.error as msg:<EOL><INDENT>if isinstance(msg, tuple): msg = msg[<NUM_LIT:1>]<EOL>server.mark_dead(msg)<EOL>rc = <NUM_LIT:0><EOL><DEDENT><DEDENT>return rc<EOL>
Delete multiple keys in the memcache doing just one query.

>>> notset_keys = mc.set_multi({'key1' : 'val1', 'key2' : 'val2'})
>>> mc.get_multi(['key1', 'key2']) == {'key1' : 'val1', 'key2' : 'val2'}
1
>>> mc.delete_multi(['key1', 'key2'])
1
>>> mc.get_multi(['key1', 'key2']) == {}
1


This method is recommended over iterated regular L{delete}s as it reduces total latency, since
your app doesn't have to wait for each round-trip of L{delete} before sending
the next one.

@param keys: An iterable of keys to clear
@param time: number of seconds any subsequent set / update commands should fail. Defaults to 0 for no delay.
@param key_prefix:  Optional string to prepend to each key when sending to memcache.
    See docs for L{get_multi} and L{set_multi}.

@return: 1 if no failure in communication with any memcacheds.
@rtype: int