💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# Cache 跨进程的高速内存缓存 这是在控制器中的使用方法 ```php public function http_map_add() { $cache = Cache::getCache('TestCache'); $cache->addMap('123'); $this->http_output->end($cache->getAllMap()); } ``` 其中TestCache是个Task类 ```php /** * Class TestCache * @package Server\Tasks */ class TestCache extends Task { public $map = []; public function addMap($value) { $this->map[] = $value; return true; } public function getAllMap() { return $this->map; } } ``` 就这么简单。