libmemcache

PHP memcache - check if any server is available in pool?

Hi everyone, I have the following code: $cluster['local'] = array('host' => '192.168.1.1', 'port' => '11211', 'weight' => 50); $cluster['local2'] = array('host' => '192.168.1.2', 'port' => '11211', 'weight' => 50); $this->memcache = new Memcache; foreach ($this->cluster() as $cluster) { $this->memcache->addServer($cluster['host']...

PHP Memcached CAS (check and set) issue

Hey all, here are the version of my current setup Memcached (1.2.2) Pecl Memcached Client 1.0.2 (using libmemcached 0.43) Issue: I cant get a cas token returned during a get request Here is the code in question! 27 public function action_test() { 28 //phpinfo(); 29 $m = Model_Mem::getSingleton(); 30 $found = $m->get(...

Having huge problems getting memcached plugin working on ub 9.04

Heya, so I've spent about 6 hours now trying to get this working. I had the following set of rules I uses to compile in the memcached plugin to php, installing libmemcached dependency first. Here are the steps: cd ~ sudo wget http://download.tangent.org/libmemcached-0.35.tar.gz sudo tar -zxf libmemcached-0.35.tar.gz cd libmemcache...

libmemcached problem

Hi all, when i run the libmemcached example code on my ubuntu, it gave me the error "undefined reference to `memcached_create'", anyone can help ? thanks #include <libmemcached/memcached.h> int main(int argc, char **argv) { //memcached_servers_parse (char *server_strings); memcached_server_st *servers = NULL; memcached_st *mem...

question with memcached_get() in libmemcached

memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error); Why need to pass the params "size_t key_length" and "size_t *value_length" here ? I think the value can be fetched by key directly. who can...