Updated memcached to pass in keys and flags to the encoder.