Key Size

Brad Fitzpatrick brad at
Fri Jan 5 19:12:27 UTC 2007

Don't use the URL as the key.  Use, say, the sha1hex of the URL as the

On Fri, 5 Jan 2007, Renato Silveira wrote:

> Hi,
> 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?
> tks!
> Renato

More information about the memcached mailing list