CFileCache

i want to use CFileCache cache file, the following is :

controller:

class SpaceController extends Controller{

public function filters(){


     return array(


          array(


              'COutputCache',


              'duration'=>86400,


              'varyByParam'=>array('id'),


             ),


      );


}

function actionIndex(){

	$value='窗前明月光 低头思故乡';


	


	$key=md5(rand(10));


    


            Yii::app()->cacheFile->set($key,$value,300);

main.php :

‘component’=>array(

          'cacheFile'=>array(


              'class'=>'system.caching.CFileCache',


              //'directoryLevel'=>3


    ),


),

after i execute controller , it don’t create any cache file in protected/runtime/cache ,how should i write?

any help be appreciated!

I think should either specify the standard cache cache component in config (tested), or add ‘cacheID’=>‘cacheFile’ to the COutputCache initial property values (not tested).

/Tommy

thank you very much! i do it as the following:

public function filters(){

     return array(


          array(


              'COutputCache',


              'duration'=>86400,


              'cacheID'=>'cacheFile',


              'varyByParam'=>array('id'),


             ),


      );


}

it create cache file in protected/runtime/cache ,is it right?