Skip to content

Commit b8c203e

Browse files
committed
Revert "fix: update function definition and add missing method implementation"
This reverts commit 42dc85e.
1 parent b2f7d04 commit b8c203e

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

classes/cache_administration_helper.php

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ public function get_definition_actions(context $context, array $definitionsummar
7575
* This function performs all of the outputting for the cache admin page,
7676
* with some custom tweaks for the plugin.
7777
*
78-
* @param \core_cache\output\renderer $renderer
78+
* @param core_cache_renderer $renderer
7979
* @return string HTML for the page;
8080
*/
81-
public function generate_admin_page(\core_cache\output\renderer $renderer): string {
81+
public function generate_admin_page(core_cache_renderer $renderer): string {
8282
$context = context_system::instance();
8383
$html = '';
8484

@@ -328,31 +328,4 @@ public static function instance(): core_cache\administration_helper {
328328
}
329329
return self::$instance;
330330
}
331-
332-
/**
333-
* Gets usage information about the whole cache system.
334-
*
335-
* This is a slow function and should only be used on an admin information page.
336-
*
337-
* The returned array lists all cache definitions with fields 'cacheid' and 'stores'. For
338-
* each store, the following fields are available:
339-
*
340-
* - name (store name)
341-
* - class (e.g. cachestore_redis)
342-
* - supported (true if we have any information)
343-
* - items (number of items stored)
344-
* - mean (mean size of item)
345-
* - sd (standard deviation for item sizes)
346-
* - margin (margin of error for mean at 95% confidence)
347-
* - storetotal (total usage for store if known, otherwise null)
348-
*
349-
* The storetotal field will be the same for every cache that uses the same store.
350-
*
351-
* @param int $samplekeys Number of keys to sample when checking size of large caches
352-
* @return array Details of cache usage
353-
*/
354-
public function get_usage(int $samplekeys): array {
355-
$corehelper = new core_cache\local\administration_display_helper();
356-
return $corehelper->get_usage($samplekeys);
357-
}
358331
}

0 commit comments

Comments
 (0)