src/Leevel/Cache/Load.php
public function data($names, array $option = [], bool $force = false): array
    {
        $names = is_array($names) ? $names : [
            $names,
        ];

        foreach ($names as $name) {
            if (!isset($this->cacheLoaded[$name]) || $force) {
                $this->cacheLoaded[$name] = $this->cache($name, $option, $force);
            }
        }

        $result = [];

        foreach ($names as $name) {
            $result[$name] = $this->cacheLoaded[$name];
        }

        return count($result) > 1 ? $result : reset($result);
    }
public function data($names, array $option = [], bool $force = false): array
    {
        $names = is_array($names) ? $names : [
            $names,
        ];

        foreach ($names as $name) {
            if (!isset($this->cacheLoaded[$name]) || $force) {
                $this->cacheLoaded[$name] = $this->cache($name, $option, $force);
            }
        }

        $result = [];

        foreach ($names as $name) {
            $result[$name] = $this->cacheLoaded[$name];
        }

        return count($result) > 1 ? $result : reset($result);
    }
载入缓存数据
系统自动存储缓存到内存，可重复执行不会重复载入数据.

@param array|string $names
@param array        $option
@param bool         $force

@return array