Does key length require storage?

Brad Fitzpatrick brad at danga.com
Mon Jan 24 14:25:57 PST 2005


It doesn't.  It could (we don't use char[251] in the item*) but we just
arbitrarily chose 250 as the limit so we COULD use char[251] in various
places where we didn't want to dynamically allocate memory.

- Brad

On Mon, 24 Jan 2005, xing at fictionpress.com wrote:

> I'm confused well. The memcached protocol explicitly defines a
> limitation of 250 chars as the key value. How is memcached able to store
> client keys that are larger than the limit without hashing?
>
> Xing
>
> Kevin A. Burton wrote:
> > Anatoly Vorobey wrote:
> >
> >>On Sun, Jan 23, 2005 at 10:19:22PM -0800, Kevin A. Burton wrote:
> >>
> >>
> >>>The current  protocol.txt says that the maximum lenght of a key is 250
> >>>characters.
> >>>
> >>>Is there any hashing done in the server to prevent storage of the key or
> >>>is the entire key stored so that the server can rehash if necessary?
> >>>
> >>>
> >>
> >>The entire key is stored and matched when necessary.
> >>
> >>
> >>
> > Why isn't this documented anywhere.  Should we be recommending that
> > people use short keys when possible?
> >
> > Kevin
> >
> > --
> >
> > Use Rojo (RSS/Atom aggregator).  Visit http://rojo.com. Ask me for an
> > invite!  Also see irc.freenode.net #rojo if you want to chat.
> >
> > Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html
> >
> > If you're interested in RSS, Weblogs, Social Networking, etc... then you
> > should work for Rojo!  If you recommend someone and we hire them you'll
> > get a free iPod!
> >
> > Kevin A. Burton, Location - San Francisco, CA
> >        AIM/YIM - sfburtonator,  Web - http://peerfear.org/
> > GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
> >
>
>


More information about the memcached mailing list