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:
@@ -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';
|
||||
|
||||
@@ -271,4 +271,10 @@ $definitions = array(
|
||||
'staticaccelerationsize' => 3
|
||||
),
|
||||
|
||||
// Store temporary tables information.
|
||||
'temp_tables' => array(
|
||||
'mode' => cache_store::MODE_REQUEST,
|
||||
'simplekeys' => true
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user