perf(cache): update system configuration and version caching logic

- Add cache update logic for system configurations in Config.php
- Modify version retrieval and caching logic in ConfigService.php
This commit is contained in:
wolfcode
2025-04-02 11:18:42 +08:00
parent db0ac015f0
commit f5813dec99
2 changed files with 3 additions and 2 deletions

View File

@@ -9,11 +9,10 @@ class ConfigService
public static function getVersion()
{
$version = cache('version');
$version = cache('site_version');
if (empty($version)) {
$version = sysConfig('site', 'site_version');
cache('site_version', $version);
Cache::set('version', $version, 3600);
}
return $version;
}