Issue #1781510 by damiankloip | dawehner: Consider renaming cache_views() to cache_views_info() and cache_views_data() to cache_views() or cache_views_results().
parent
3a12bbe055
commit
c302b50002
|
@ -104,7 +104,7 @@ function views_cache_set($cid, $data, $use_language = FALSE) {
|
|||
$cid .= ':' . language(LANGUAGE_TYPE_INTERFACE)->langcode;
|
||||
}
|
||||
|
||||
cache('cache_views')->set($cid, $data);
|
||||
cache('views_info')->set($cid, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -128,5 +128,5 @@ function views_cache_get($cid, $use_language = FALSE) {
|
|||
$cid .= ':' . language(LANGUAGE_TYPE_INTERFACE)->langcode;
|
||||
}
|
||||
|
||||
return cache('cache_views')->get($cid);
|
||||
return cache('views_info')->get($cid);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ abstract class CachePluginBase extends PluginBase {
|
|||
/**
|
||||
* What table to store data in.
|
||||
*/
|
||||
var $table = 'views_data';
|
||||
var $table = 'views_results';
|
||||
|
||||
/**
|
||||
* Stores the cache id used for the results cache, once get_results_key() got
|
||||
|
|
|
@ -117,11 +117,11 @@ function views_schema() {
|
|||
'indexes' => array('vid' => array('vid', 'position')),
|
||||
);
|
||||
|
||||
$schema['cache_views'] = drupal_get_schema_unprocessed('system', 'cache');
|
||||
$schema['cache_views_info'] = drupal_get_schema_unprocessed('system', 'cache');
|
||||
|
||||
$schema['cache_views_data'] = drupal_get_schema_unprocessed('system', 'cache');
|
||||
$schema['cache_views_data']['description'] = 'Cache table for views to store pre-rendered queries, results, and display output.';
|
||||
$schema['cache_views_data']['fields']['serialized']['default'] = 1;
|
||||
$schema['cache_views_results'] = drupal_get_schema_unprocessed('system', 'cache');
|
||||
$schema['cache_views_results']['description'] = 'Cache table for views to store pre-rendered queries, results, and display output.';
|
||||
$schema['cache_views_results']['fields']['serialized']['default'] = 1;
|
||||
|
||||
$schema['temp_store'] = array(
|
||||
'description' => t('A temporary data store for objects that are being edited. Allows state to be saved in a stateless environment.'),
|
||||
|
|
16
views.module
16
views.module
|
@ -989,31 +989,31 @@ function views_language_list($field = 'name', $all = FALSE) {
|
|||
* Implements hook_cache_flush().
|
||||
*/
|
||||
function views_cache_flush() {
|
||||
return array('cache_views', 'cache_views_data');
|
||||
return array('views_info', 'views_results');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_field_create_instance.
|
||||
*/
|
||||
function views_field_create_instance($instance) {
|
||||
cache('cache_views')->flush();
|
||||
cache('cache_views_data')->flush();
|
||||
cache('views_info')->flush();
|
||||
cache('views_results')->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_field_update_instance.
|
||||
*/
|
||||
function views_field_update_instance($instance, $prior_instance) {
|
||||
cache('cache_views')->flush();
|
||||
cache('cache_views_data')->flush();
|
||||
cache('views_info')->flush();
|
||||
cache('views_results')->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_field_delete_instance.
|
||||
*/
|
||||
function views_field_delete_instance($instance) {
|
||||
cache('cache_views')->flush();
|
||||
cache('cache_views_data')->flush();
|
||||
cache('views_info')->flush();
|
||||
cache('views_results')->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1021,7 +1021,7 @@ function views_field_delete_instance($instance) {
|
|||
*/
|
||||
function views_invalidate_cache() {
|
||||
// Clear the views cache.
|
||||
cache('cache_views')->flush();
|
||||
cache('views_info')->flush();
|
||||
|
||||
// Clear the page and block cache.
|
||||
cache_invalidate(array('content' => TRUE));
|
||||
|
|
Loading…
Reference in New Issue