i want to use memcache of yii.
now,in main.php,i had configure the code like this,
'cache'=>array(
'class'=>'CMemCache',
'servers'=>array(
array(
'host'=>'127.0.0.1',
'port'=>11211,
),
),
'keyPrefix' => '',
'hashKey' => false,
'serializer' => false
and in controller,
$key = 'people';
$value = json_encode(array('name'=>'ball', 'age'=>'male'));
$expire = 60;
if(Yii::app()->cache->set($key, $value, $expire))
echo "insert success";
else
echo "insert failed";
$gg = Yii::app()->cache->get($key);
print_r($gg);
exit();
now ,insert success had showed,but i can’t get $gg’value,
what’s the matter.