Issues

ZF-5938: Zend_Cache_Backend_Memcached failure_callback option

Issue Type: Improvement Created: 2009-03-04T07:40:00.000+0000 Last Updated: 2012-02-10T09:16:12.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Imthiaz (hmimthiaz) Assignee: Satoru Yoshida (satoruyoshida) Tags: - Zend_Cache

Related issues: - ZF-6239

Attachments:

Description

We should have an option to set failure call back function. I am trying to get failure count and report to admin if the memcache server is failing.

if (!array_key_exists('failure_callback', $server)) { $server['failure_callback'] = ''; } $this->_memcache->addServer($server['host'], $server['port'], $server['persistent'], $server['weight'], $server['timeout'], $server['retry_interval'], $server['status'], $server['failure_callback']
);

for now I am extending the class and over ruled the constructor.

Comments

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-03-28T04:04:03.000+0000

Hi, Imthiaz.

The failure_callback requires only string ?

I have afraid because the failure_callback may become varied types. http://jp.php.net/manual/en/…

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-04-03T20:41:26.000+0000

I add the option to addServer. But , please tell me if the fix will break compatibility from ZF-5887

Posted by Imthiaz (hmimthiaz) on 2009-04-03T22:20:39.000+0000

Hi

Thanks for the update, I used this file and it worked perfect.

http://framework.zend.com/svn/framework/…

Can we have one function to get the memcache object

public function getMemcacheObject(){ return $this->_memcache; }

This can be really usefull when to get stats from the connected servers.

$allServerFailed = true; $cacheServerStatus = $this->cacheAdapterClassInstance->getMemcacheObject ()->getExtendedStats (); if (! empty ( $cacheServerStatus )) { foreach ( $cacheServerStatus as $server => $status ) { if ($status !== false) { $allServerFailed = FALSE; } } }

Thanks for your update.

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-04-04T03:39:07.000+0000

Hi, Imthiaz.

I feel happy because you feel good on this update. :-)

I will be also happy if you create new issue about getMemcacheObject() .

With Best Wishes.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts