Skip to content

Commit

Permalink
MDL-60341 core_cache: show cache definitions that can use local store
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Aug 28, 2019
1 parent 0dca957 commit 8e86a8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cache/renderer.php
Expand Up @@ -228,7 +228,8 @@ public function definition_summaries(array $definitionsummaries, context $contex
get_string('area', 'cache'),
get_string('mappings', 'cache'),
get_string('sharing', 'cache'),
get_string('actions', 'cache'),
get_string('canuselocalstore', 'cache'),
get_string('actions', 'cache')
);
$table->colclasses = array(
'definition',
Expand All @@ -237,6 +238,7 @@ public function definition_summaries(array $definitionsummaries, context $contex
'area',
'mappings',
'sharing',
'canuselocalstore',
'actions'
);
$table->data = array();
Expand All @@ -257,13 +259,21 @@ public function definition_summaries(array $definitionsummaries, context $contex
$mapping = '<em>'.$none.'</em>';
}

$uselocalcachecol = get_string('no');
if ($definition['mode'] != cache_store::MODE_REQUEST) {
if (isset($definition['canuselocalstore']) && $definition['canuselocalstore']) {
$uselocalcachecol = get_string('yes');
}
}

$row = new html_table_row(array(
$definition['name'],
get_string('mode_'.$definition['mode'], 'cache'),
$definition['component'],
$definition['area'],
$mapping,
join(', ', $definition['selectedsharingoption']),
$uselocalcachecol,
join(', ', $htmlactions)
));
$row->attributes['class'] = 'definition-'.$definition['component'].'-'.$definition['area'];
Expand Down
1 change: 1 addition & 0 deletions lang/en/cache.php
Expand Up @@ -81,6 +81,7 @@
$string['cachedef_yuimodules'] = 'YUI Module definitions';
$string['cachelock_file_default'] = 'Default file locking';
$string['cachestores'] = 'Cache stores';
$string['canuselocalstore'] = 'Can use local store';
$string['component'] = 'Component';
$string['confirmlockdeletion'] = 'Confirm lock deletion';
$string['confirmstoredeletion'] = 'Confirm store deletion';
Expand Down

0 comments on commit 8e86a8d

Please sign in to comment.