Révision ba3b3627
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/views.module | ||
---|---|---|
1012 | 1012 |
|
1013 | 1013 |
/** |
1014 | 1014 |
* Invalidate the views cache, forcing a rebuild on the next grab of table data. |
1015 |
* |
|
1016 |
* @param string $cid |
|
1017 |
* The cache identifier we want to clear. If no given, it will default to '*' |
|
1018 |
* which will clear the entire cache_views bin. |
|
1015 | 1019 |
*/ |
1016 |
function views_invalidate_cache() { |
|
1020 |
function views_invalidate_cache($cid = '*') {
|
|
1017 | 1021 |
// Clear the views cache. |
1018 |
cache_clear_all('*', 'cache_views', TRUE);
|
|
1022 |
cache_clear_all($cid, 'cache_views', TRUE);
|
|
1019 | 1023 |
|
1020 | 1024 |
// Clear the page and block cache. |
1021 | 1025 |
cache_clear_all(); |
... | ... | |
1024 | 1028 |
variable_set('menu_rebuild_needed', TRUE); |
1025 | 1029 |
|
1026 | 1030 |
// Allow modules to respond to the Views cache being cleared. |
1027 |
module_invoke_all('views_invalidate_cache'); |
|
1031 |
module_invoke_all('views_invalidate_cache', $cid);
|
|
1028 | 1032 |
} |
1029 | 1033 |
|
1030 | 1034 |
/** |
Formats disponibles : Unified diff
Weekly update of contrib modules