MDL-51374 cache: add temp_tables cache definition

Also a helper method get_temp_tables_cache() has been created for temporary tables cache operations.
This commit is contained in:
Simey Lameze
2016-03-15 10:57:43 +08:00
parent e8952c5951
commit 26e7eceefc
3 changed files with 16 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@ $string['cachedef_repositories'] = 'Repositories instances data';
$string['cachedef_search_results'] = 'Search results user data';
$string['cachedef_string'] = 'Language string cache';
$string['cachedef_tags'] = 'Tags collections and areas';
$string['cachedef_temp_tables'] = 'Temporary tables cache';
$string['cachedef_userselections'] = 'Data used to persist user selections throughout Moodle';
$string['cachedef_yuimodules'] = 'YUI Module definitions';
$string['cachelock_file_default'] = 'Default file locking';
+6
View File
@@ -271,4 +271,10 @@ $definitions = array(
'staticaccelerationsize' => 3
),
// Store temporary tables information.
'temp_tables' => array(
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true
),
);
+9
View File
@@ -336,6 +336,15 @@ abstract class moodle_database {
return cache::make('core', 'databasemeta', $properties);
}
/**
* Handle the creation and caching of the temporary tables.
*
* @return cache_application The temp_tables cachestore to complete operations on.
*/
protected function get_temp_tables_cache() {
return cache::make('core', 'temp_tables');
}
/**
* Attempt to create the database
* @param string $dbhost The database host.