We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d19ab0f commit f3533a5Copy full SHA for f3533a5
1 file changed
src/API/Services.php
@@ -242,9 +242,11 @@ protected static function calcolaSpazioOccupato()
242
// Prova a recuperare dalla cache
243
$cache = Cache::where('name', 'Spazio utilizzato')->first();
244
if ($cache && $cache->isValid()) {
245
- return (int) $cache->content;
+ $osm_size = $cache->content;
246
+ }
247
+ if (!$osm_size) {
248
+ $osm_size = FileSystem::folderSize(base_dir(), ['htaccess']);
249
}
- $osm_size = FileSystem::folderSize(base_dir(), ['htaccess']);
250
251
return $osm_size;
252
} catch (\Exception $e) {
0 commit comments