« blib/lib/Memcached/libmemcached/memcached_flush_buffers.pm
↑ Summary
blib/lib/Memcached/libmemcached/memcached_get.pm »
| 1 | package Memcached::libmemcached::memcached_generate_hash_value; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | memcached_generate_hash_value - Hash a key value | ||
| 6 | |||
| 7 | =head1 LIBRARY | ||
| 8 | |||
| 9 | C Client Library for memcached (libmemcached, -lmemcached) | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | #include <memcached.h> | ||
| 14 | |||
| 15 | uint32_t | ||
| 16 | memcached_generate_hash_value (const char *key, | ||
| 17 | size_t key_length, | ||
| 18 | memcached_hash_t hash_algorithm); | ||
| 19 | |||
| 20 | uint32_t | ||
| 21 | memcached_generate_hash (memcached_st *ptr, | ||
| 22 | const char *key, | ||
| 23 | size_t key_length); | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | memcached_generate_hash_value() allows you to hash a key using one of | ||
| 28 | the hash functions defined in the library. This method is provided for | ||
| 29 | the convenience of higher-level language bindings and is not necessary | ||
| 30 | for normal memcache operations. | ||
| 31 | |||
| 32 | The allowed hash algorithm constants are listed in the manpage for | ||
| 33 | memcached_behavior_set(). | ||
| 34 | |||
| 35 | memcached_generate_hash() takes a memcached_st struture and produces | ||
| 36 | the hash value that would have been generated based on the defaults | ||
| 37 | of the memcached_st structure. | ||
| 38 | |||
| 39 | As of version 0.36 all hash methods have been placed into the library | ||
| 40 | libhashkit(3) which is linked with libmemcached(3). | ||
| 41 | |||
| 42 | =head1 RETURN | ||
| 43 | |||
| 44 | A 32-bit integer which is the result of hashing the given key. | ||
| 45 | For 64-bit hash algorithms, only the least-significant 32 bits are | ||
| 46 | returned. | ||
| 47 | |||
| 48 | =head1 HOME | ||
| 49 | |||
| 50 | To find out more information please check: | ||
| 51 | L<https://launchpad.net/libmemcached> | ||
| 52 | |||
| 53 | =head1 AUTHOR | ||
| 54 | |||
| 55 | Brian Aker, E<lt>brian@tangent.orgE<gt> | ||
| 56 | |||
| 57 | =head1 SEE ALSO | ||
| 58 | |||
| 59 | memcached(1) libmemcached(3) memcached_behavior_set(3) libhashkit(3) | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | 1 | 1; |