Merge branch 'issue-38' into 'master'
feat/fix: ✨ 🐛 change Cache::get to Cache::remember in Middleware... See merge request ldc-web/projets/gen-game-web!40
This commit is contained in:
commit
d649bc1eb1
3 changed files with 6 additions and 3 deletions
|
|
@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
|||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
|
|
@ -24,7 +25,9 @@ class CheckThemeVersion
|
|||
// phpcs:enable
|
||||
|
||||
if (!app()->runningInConsole()) {
|
||||
$appInfos = Cache::get('composer');
|
||||
$appInfos = Cache::remember('composer', 84600, function () {
|
||||
return json_decode(File::get(\app_path('../composer.json')));
|
||||
});
|
||||
// * Assert theme version does not diverge more than minor
|
||||
$appVer = Str::of($appInfos->version)->explode('.');
|
||||
$themeVer = Str::of(config('theme.version'))->explode('.');
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class ViewServiceProvider extends ServiceProvider
|
|||
View::addNamespace('back', resource_path('views'));
|
||||
View::addNamespace('theme', resource_path('theme/mounted/views'));
|
||||
|
||||
$appInfos = Cache::remember('composer', 360, function () {
|
||||
$appInfos = Cache::remember('composer', 84600, function () {
|
||||
return json_decode(File::get(\app_path('../composer.json')));
|
||||
});
|
||||
// Share composer.json infos.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "uwil/gen-game-web",
|
||||
"version": "2.4.5",
|
||||
"version": "2.4.6",
|
||||
"type": "project",
|
||||
"description": "Game generator",
|
||||
"support": {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue