fix(vikon): store version in file instead of cache to prevent revert after TTL expiry

This commit is contained in:
F4ilji
2026-07-06 13:28:22 +05:00
parent 9f4dfd9bfc
commit 65f4220932
6 changed files with 31 additions and 43 deletions
@@ -95,13 +95,11 @@ class VikonServiceProvider extends ServiceProvider
$this->loadRoutesFrom(app_path('Containers/VikonIntegration/UI/WEB/Routes/web.php'));
$this->app->bind('vikon.version', function () {
$cached = cache()->get('vikon:current_version');
if ($cached) {
return $cached;
$file = config('vikon.version_file');
if ($file && file_exists($file)) {
return trim(file_get_contents($file));
}
$version = config('vikon.current_version', '5.90.8.1');
cache()->put('vikon:current_version', $version, 3600);
return $version;
return config('vikon.current_version', '5.90.8.1');
});
}
}