+static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool)
+{
+ if (key_length == 0)
+ {
+ return MEMCACHED_BAD_KEY_PROVIDED;
+ }
+
+ // No one ever reimplemented MEMCACHED to use keys longer then the original ascii length
+#if 0
+ if (binary)
+ {
+ if (key_length > 0xffff)
+ {
+ return MEMCACHED_BAD_KEY_PROVIDED;
+ }
+ }
+ else
+#endif
+ {
+ if (key_length >= MEMCACHED_MAX_KEY)
+ {
+ return MEMCACHED_BAD_KEY_PROVIDED;
+ }
+ }
+
+ return MEMCACHED_SUCCESS;
+}
+
+memcached_return_t memcached_key_test(memcached_st &memc,