<HTML>
<HEAD>
<TITLE>Re: Key Size</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>I misspoke about whitespace...the server will drop it, not the client.<BR>
<BR>
<BR>
On 1/5/07 11:25 AM, "Marc" <Marc@facebook.com> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>I see two possible problems. First – as you note – the client needs to deal with the increase too. I’m not sure which one you’re using but for most implementations, the default read -buf size for GET results is 250+1 so, if memcached is returning results like:<BR>
VALUE very<250>long_key 0 3\r\nxxx\r\nEND <BR>
It very well may be the case that the client punts after scanning “VALUE very<250>” without seeing either space (\b) or CRLF (\r\n)<BR>
<BR>
Second, if you have spaces in your URL this will cause similar problems. The client will take the following:<BR>
VALUE <a href="http://url/key/with">http://url/key/with</a> white space 0 3\r\nxxx\r\nEND<BR>
<BR>
as the value for key “<a href="http://url/key/with˛">http://url/key/with”</a> and not finding a corresponding client request for that key will most likely discard it.<BR>
<BR>
On 1/5/07 11:08 AM, "Renato Silveira" <renatosilveira@gmail.com> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi,<BR>
<BR>
I´m using memcached as a URL keyword cache. The url is the key and the cached object is a string with relevant keywords of the site. Well, it´s working fine for my purpose. The only problem is the limit of key size to 250 bytes(because there can be url bigger than 250 bytes). Well, I tried to increase the value of the constant KEY_MAX_LENGTH to 2048 bytes. I recompile memcached and it´s not working. Should I have to make any modification on the client API? Does anyone can helpme with this issue? <BR>
<BR>
tks!<BR>
<BR>
Renato<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
</SPAN></FONT>
</BODY>
</HTML>