diff --git a/admin/intro.php b/admin/intro.php index 72b4754ea..cfb362600 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -443,6 +443,19 @@ if (isset($result[0]['SUM(filesize)'])) $data_storage['Formats'] = $result[0]['SUM(filesize)']; } +// Add cache size if requested and known. +if ($conf['add_cache_to_storage_chart'] && isset($conf['cache_sizes'])) +{ + $cache_sizes = unserialize($conf['cache_sizes']); + if (isset($cache_sizes)) + { + if (isset($cache_sizes[0]) && isset($cache_sizes[0]['value'])) + { + $data_storage['Cache'] = $cache_sizes[0]['value']/1024; + } + } +} + //Calculate total storage $total_storage = 0; foreach ($data_storage as $value) diff --git a/include/config_default.inc.php b/include/config_default.inc.php index 368d943fa..54a44d751 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -740,6 +740,11 @@ $conf['album_move_delay_before_auto_opening'] = 3*1000; // This variable is used to show or hide the template tab in the side menu $conf['show_template_in_side_menu'] = false; +// Add last calculated cache size to Dashboard Storage chart if true. +// To recalculate use Tools -> Maintenance, Refresh. +// To disable, set to false. +$conf['add_cache_to_storage_chart'] = true; + // +-----------------------------------------------------------------------+ // | Filter | // +-----------------------------------------------------------------------+