Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 2 additions & 29 deletions classes/cache_administration_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public function get_definition_actions(context $context, array $definitionsummar
* This function performs all of the outputting for the cache admin page,
* with some custom tweaks for the plugin.
*
* @param \core_cache\output\renderer $renderer
* @param core_cache_renderer $renderer
* @return string HTML for the page;
*/
public function generate_admin_page(\core_cache\output\renderer $renderer): string {
public function generate_admin_page(core_cache_renderer $renderer): string {
$context = context_system::instance();
$html = '';

Expand Down Expand Up @@ -328,31 +328,4 @@ public static function instance(): core_cache\administration_helper {
}
return self::$instance;
}

/**
* Gets usage information about the whole cache system.
*
* This is a slow function and should only be used on an admin information page.
*
* The returned array lists all cache definitions with fields 'cacheid' and 'stores'. For
* each store, the following fields are available:
*
* - name (store name)
* - class (e.g. cachestore_redis)
* - supported (true if we have any information)
* - items (number of items stored)
* - mean (mean size of item)
* - sd (standard deviation for item sizes)
* - margin (margin of error for mean at 95% confidence)
* - storetotal (total usage for store if known, otherwise null)
*
* The storetotal field will be the same for every cache that uses the same store.
*
* @param int $samplekeys Number of keys to sample when checking size of large caches
* @return array Details of cache usage
*/
public function get_usage(int $samplekeys): array {
$corehelper = new core_cache\local\administration_display_helper();
return $corehelper->get_usage($samplekeys);
}
}
Loading