|
@@ -20,6 +20,7 @@ use think\facade\Event;
|
|
|
use think\facade\Log;
|
|
use think\facade\Log;
|
|
|
use think\facade\Validate;
|
|
use think\facade\Validate;
|
|
|
use think\Service;
|
|
use think\Service;
|
|
|
|
|
+use function SixShop\Core\extension_name_list;
|
|
|
|
|
|
|
|
class ExtensionManager extends Service
|
|
class ExtensionManager extends Service
|
|
|
{
|
|
{
|
|
@@ -258,8 +259,10 @@ class ExtensionManager extends Service
|
|
|
|
|
|
|
|
public function getExtensionList(): array
|
|
public function getExtensionList(): array
|
|
|
{
|
|
{
|
|
|
- foreach (Helper::extension_name_list() as $name) {
|
|
|
|
|
- $this->app->cache->set(sprintf(ExtensionModel::EXTENSION_INFO_CACHE_KEY, $name), $this->initExtensionInfo($name));
|
|
|
|
|
|
|
+ foreach (extension_name_list() as $name) {
|
|
|
|
|
+ $this->extensionList[$name] = $this->app->cache->remember(sprintf(ExtensionModel::EXTENSION_INFO_CACHE_KEY, $name), function () use ($name) {
|
|
|
|
|
+ return $this->initExtensionInfo($name);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
return $this->extensionList;
|
|
return $this->extensionList;
|
|
|
}
|
|
}
|