getPageCacheExtendedInfo(); $BasicStats = [ [ "Number of Pages", number_format($CacheInfo["NumberOfEntries"]), ], [ "Oldest Page in Cache", date(DATE_FORMAT, $CacheInfo["OldestTimestamp"]), ], [ "Newest Page in Cache", date(DATE_FORMAT, $CacheInfo["NewestTimestamp"]), ], ]; $BasicStatsTable = new HtmlTable(); $BasicStatsTable->setTableClass("table table-striped"); $BasicStatsTable->addRows($BasicStats); # set up item list for cached page info $Fields = [ "Page" => [ "DefaultSortField" => true, ], "Count" => [ "ValueFunction" => function ($Value, $Field) { return number_format($Value[$Field]); }, "DefaultToDescendingSort" => true, "AlignRight" => true, ], "AverageSize" => [ "Heading" => "Average Size", "ValueFunction" => function ($Value, $Field) { return sprintf("%.1f KB", $Value[$Field] / 1024); }, "DefaultToDescendingSort" => true, "AlignRight" => true, ], "OldestTimestamp" => [ "Heading" => "Oldest Entry", "ValueFunction" => function ($Value, $Field) { return date(DATE_FORMAT, $Value[$Field]); }, ], "NewestTimestamp" => [ "Heading" => "Newest Entry", "ValueFunction" => function ($Value, $Field) { return date(DATE_FORMAT, $Value[$Field]); }, ], ]; $CPList = new ItemListUI($Fields, $CacheInfo["PageInfo"]); $CPList->setHeading("Cached Pages"); $CPList->sort(); # ----- DISPLAY -------------------------------------------------------------- $AF->setPageTitle("Page Cache Statistics"); ?>

# Page Cache Info

getHtml() ?> getHtml() ?>