选择语言 :

 Driver_Cache_Driver_SQLite::__construct

Memcache缓存驱动器

null Driver_Cache_Driver_SQLite::__construct( [ $config_name $config_name = string(7) "default" ] )

参数列表

参数 类型 描述 默认值
$config_name $config_name 配置名或数组 string(7) "default"
File: ./drivers/cache/sqlite/sqlite.class.php
public function __construct($config_name = 'default')
{
    $connection = array
    (
        'db'         => ':memory:',
        'table'      => 'sharedmemory',
        'expire'     => Cache_Driver_SQLite::DEFAULT_CACHE_TIME,
        'persistent' => false,
        'length'     => 0,
    );

    if ( is_array($config_name) )
    {
        $connection += $config_name;
        $config_name = md5(serialize($config_name));
    }
    else
    {
        $connection += (array)Core::config('cache/sqlite.' . $config_name);
    }

    if ( Cache_Driver_SQLite::DATA_COMPRESS && function_exists('gzcompress') )
    {
        $this->_compress = true;
    }

    $this->_handler = new Database(array('type'=>'SQLite', 'connection'=>$connection));

    $this->tablename = $connection['tablename'];
}