Best practices for automatically removing spaces from keys...

Sean Chittenden sean at
Thu Nov 18 13:31:11 PST 2004

I'm curious what people think the best practices are regarding spaces 
in keys.  In libmemcache(3), I pass spaces right through to the wire 
and am not too terribly happy about that.  What is the best 
alternative?  I'm thinking that replacing it with '_' would be more 
appropriate, or even (char)254 since that should fail isspace(3) and 
would be reasonably unique enough to allow (char)254 to be mapped back 
to a space (yeah, I know non-ascii keys will break, but...).  Thoughts?


Sean Chittenden

More information about the memcached mailing list