选择语言 :

 Module_Cache::__construct

null Module_Cache::__construct( )
File: ./modules/cache/cache.class.php
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
public function __construct($name = null)
{
    $this->load_config($name);
 
    if ($this->config['driver']==Cache::DRIVER_FILE)
    {
        $this->check_file_config($name);
    }
 
    $driver = 'Cache_Driver_' . $this->config['driver'];
    if (!class_exists($driver, true))
    {
        throw new Exception(__('The :type driver :driver does not exist', array(':type'=>'Cache', ':driver'=>$this->config['driver'])));
    }
 
    $this->driver = new $driver($this->config['driver_config']);
 
    # 设置前缀
    if ($this->config['prefix'])
    {
        $this->driver->set_prefix($this->config['prefix']);
    }
}