AddonModel::resetAddonCache PHP Method

resetAddonCache() public method

重置所有已安装插件列表缓存
public resetAddonCache ( $renew = false ) : array
return array 最新的插件列表
    public function resetAddonCache($renew = false)
    {
        if (empty($this->fileAddons) || $renew) {
            $this->_getFileAddons();
        }
        $addonList = $this->getAddonsValid();
        $addonCache = array();
        foreach ($addonList as $key => $value) {
            if (isset($this->fileAddons[$value['name']])) {
                $addonCache = $this->_createAddonsCacheData($value['name'], $addonCache);
            }
        }
        $res = S('system_addons_list', $addonCache);
        return $addonCache;
    }