emcache server status check in Yii framework


Using Memcache server in Yii framework is working fine. In case, the memcache server gets down, Yii application crashes with a PHP error. I would like to catch memcache server status before it throws error so that my application runs smoothly even without caching.

I tried to override CMemCache (which inherits CCache ) but that’s no use because some of the methods are being called directly to Yii CCache class and that also cause application crash.

Is there any work around ? Or if we can switch to any other cache engine at run time ?

Yii framework: version 1.1.8