<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, &quot;Marc&quot; &lt;Marc@facebook.com&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>I see two possible problems. &nbsp;First &#8211; as you note &#8211; the client needs to deal with the increase too. &nbsp;I&#8217;m not sure which one you&#8217;re using but for most implementations, the default read -buf &nbsp;size for GET results is 250+1 so, if memcached is returning results like:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;VALUE very&lt;250&gt;long_key 0 3\r\nxxx\r\nEND <BR>
It very well may be the case that the client punts after scanning &#8220;VALUE very&lt;250&gt;&#8221; without seeing either space (\b) or CRLF (\r\n)<BR>
<BR>
Second, if you have spaces in your URL this will cause similar problems. &nbsp;The client will take the following:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;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 &#8220;<a href="http://url/key/with˛">http://url/key/with&#8221;</a> and not finding a corresponding client request for that key will &nbsp;most likely discard it.<BR>
<BR>
On 1/5/07 11:08 AM, &quot;Renato Silveira&quot; &lt;renatosilveira@gmail.com&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi,<BR>
<BR>
I&acute;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&acute;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&acute;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>