╃巡洋艦㊣ 2011-07-08 10:48:46 4890次浏览 4条回复 2 2 0
// application components
'components'=>array(
  'db'=>array(
    'connectionString' => 'mysql:host=localhost;dbname=database',
    'username' => 'root',
    'password' => '123456',
    'charset' => 'utf8',
    'schemaCachingDuration'=>3600,   //这里是数据缓存时间
  ),
                
  'cache'=>array(
    'class'=>'system.caching.CFileCache',    
    //我们使用CFileCache实现缓存,缓存文件存放在runtime文件夹中
    'directoryLevel'=>'2',   //缓存文件的目录深度
  ),
),
觉得很赞
您需要登录后才可以回复。登录 | 立即注册