In Yii, I turned on APC caching through the config / main.php file:
'cache' => array( 'class' => 'system.caching.CApcCache', ),
and it works fine when I use Yii's built-in caching methods:
Yii::app()->cache->set('key', $value);
However, is there a way to temporarily disable this based on configuration? I do not want it to be turned on and YII_DEBUG set to true, and would like $votes = Yii::app()->cache->get("key"); always returned false, as if it was empty.
I tried to disable this by simply commenting out the configuration settings, but it gives (not unreasonable) errors: Call to a member function get() on a non-object
php caching yii
Ian hunter
source share