mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-20 15:15:35 +08:00
initial 2.0.0-a4 commit
This commit is contained in:
@@ -8,14 +8,19 @@ class LightCacheTest extends TestCase
|
||||
{
|
||||
public function testCache() {
|
||||
LightCache::init([
|
||||
"size" => 2048,
|
||||
"size" => 2,
|
||||
"max_strlen" => 4096,
|
||||
"hash_conflict_proportion" => 0.6,
|
||||
"hash_conflict_proportion" => 0,
|
||||
"persistence_path" => "../composer.json"
|
||||
]);
|
||||
//LightCache::set("bool", true);
|
||||
$this->assertEquals(true, LightCache::set("2048", 123, 3));
|
||||
$this->assertArrayHasKey("2048", LightCache::getAll());
|
||||
sleep(3);
|
||||
$this->assertArrayNotHasKey("2048", LightCache::getAll());
|
||||
$this->assertEquals("Apache-2.0", LightCache::get("license"));
|
||||
$this->assertEquals("zhamao/framework", LightCache::get("name"));
|
||||
//$this->assertTrue(LightCache::set("storage", "asdasd", -2));
|
||||
//LightCache::savePersistence();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,6 @@ $config['debug_mode'] = false;
|
||||
/** 存放框架内文件数据的目录 */
|
||||
$config['zm_data'] = realpath(__DIR__ . "/../") . '/zm_data/';
|
||||
|
||||
/** 存放各个模块配置文件的目录 */
|
||||
$config['config_dir'] = $config['zm_data'] . 'config/';
|
||||
|
||||
/** 存放崩溃和运行日志的目录 */
|
||||
$config['crash_dir'] = $config['zm_data'] . 'crash/';
|
||||
|
||||
@@ -107,7 +104,7 @@ $config['command_register_class'] = [
|
||||
];
|
||||
|
||||
/** 服务器启用的外部第三方和内部插件 */
|
||||
$config['plugins'] = [
|
||||
$config['modules'] = [
|
||||
'qqbot' => true, // QQ机器人事件解析器,如果取消此项则默认为 true 开启状态,否则你手动填写 false 才会关闭
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user