cache_new()
cache_new($cacheconf)
【功能】
根据指定的配置参数,实例化一个 Cache 类。
一般不需要调用此函数,除非需要多个 Cache 实例。
【参数】
$cacheconf:Cache 配置数据
【用例】
<?php
$cacheconf = array (
"enable" => true,
"type" => "xcache",
"xcache" => array (
"cachepre" => "pre_",
),
);
include "./xiunophp/xiunophp.php";
$newcache = cache_new($cacheconf);
$newcache->set("key1", "value1");
?>