flushing items by prefix
pafei at citrin.ch
Sun Apr 3 22:13:26 PDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
| But now we go from everything inside memcached being O(1) to suddenly
| having a potentially slow O(n) operation.
| The way I'd prefer to see this done is finish doing server-side namespace
| support, then support a wipe on a namespace.
I completly agree on that. O(n) is bad.
I see two possible solutions for that:
a) A major change in the API, because all requests have to add the
namespace they are ment for.
b) An additional command 'set_namespace'. Alle following commands in the
~ current connection work within the given namespace until the next
'set_namespace' is given.
I think b) is the way to go. It does only add one additional command and
does not change the current API. I think also that most of the time you
have one namespace per connection. So the namespace can be set just
after making the connection.
Drawback: If you use multiple namespaces within one connection you have
always to prepend the 'set_namespace'.
What do you think?
Citrin, Feisthammel und Partner, Phone: +41 1 940 6161
Steigstrasse 55, CH-8610 Uster, Switzerland Fax: +41 43 399 0506
http://www.citrin.ch/ email: citrin at citrin.ch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the memcached