apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <p...@querna.org>
Subject Re: apr_memcache flags parameter should be apr_uint32_t, not apr_uint16_t
Date Mon, 23 Mar 2009 09:27:59 GMT
On Sun, Mar 22, 2009 at 8:19 PM, Kevac Marko <marko@kevac.org> wrote:
> Can someone say something about this?
>
> On Tue, Mar 17, 2009 at 3:08 PM, Kevac Marko <marko@kevac.org> wrote:
>> Hello
>>
>> apr_memcache flags parameter should be apr_uint32_t, not apr_uint16_t
>>
>> Comments?

No, it should always be an apr_uint16_t, per the protocol specification:
<http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt>
"""
- <flags> is an arbitrary 16-bit unsigned integer (written out in
  decimal) that the server stores along with the data and sends back
  when the item is retrieved. Clients may use this as a bit field to
  store data-specific information; this field is opaque to the server.
  Note that in memcached 1.2.1 and higher, flags may be 32-bits, instead
  of 16, but you might want to restrict yourself to 16 bits for
  compatibility with older versions.
"""

Maybe in a few years once all older memcached servers are gone, or
everyone switches to the binary protocol, then it makes sense.

(or we go around and add -2 postfix functions for all of the
apr_memcache things that can deal with the flags, which i'm fine with
doing, but would rather spend energy on binary protocol support.)

Mime
View raw message