File tree Expand file tree Collapse file tree
modules/stato_servizi/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ public function execute()
3535 $ result = [
3636 'response ' => 1 ,
3737 'message ' => tr ('Controllo servizi attivi completato! ' ),
38- ];
39-
38+ ];
39+
40+ $ cache = Cache::where ('name ' , 'Informazioni su Services ' )->first ();
41+
4042 try {
4143 if (Services::isEnabled ()) {
42- $ servizi = Services::getServiziAttivi ();
43- $ cache = Cache::where ('name ' , 'Informazioni su Services ' )->first ();
44- $ cache ->set ($ servizi );
44+ $ result = Services::getServiziAttivi ();
4545 }
4646 } catch (\Exception $ e ) {
4747 $ result = [
@@ -50,9 +50,9 @@ public function execute()
5050 '_error_ ' => $ e ->getMessage (),
5151 ]),
5252 ];
53- $ cache ->set ($ result );
54- }
53+ }
5554
55+ $ cache ->set ($ result );
5656 return $ result ;
5757 }
5858}
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public static function getInformazioni($force = false)
5656 $ cache = Cache::where ('name ' , 'Informazioni su Services ' )->first ();
5757
5858 // Aggiornamento dei contenuti della cache
59- if (!$ cache ->isValid () || $ force ) {
59+ if (!$ cache ->isValid () || $ force || empty ( $ cache -> content ) ) {
6060 // Calcolo spazio occupato
6161 $ spazio_occupato = self ::calcolaSpazioOccupato ();
6262
You can’t perform that action at this time.
0 commit comments