Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
245db071
Commit
245db071
authored
Sep 11, 2011
by
Dries Buytaert
Browse files
- Patch
#1275808
by bfroehle: use new cache bin naming in hook_flush_cache().
parent
849860fb
Changes
6
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
245db071
...
...
@@ -7146,10 +7146,10 @@ function drupal_flush_all_caches() {
// Don't clear cache_form - in-progress form submissions may break.
// Ordered so clearing the page cache will always be the last action.
$core = array('cache', '
cache_
path', '
cache_
filter', '
cache_
bootstrap', '
cache_
page');
$cache_
table
s = array_merge(module_invoke_all('flush_caches'), $core);
foreach ($cache_
table
s as $
table
) {
cache($
table
)->flush();
$core
=
array
(
'cache'
,
'path'
,
'filter'
,
'bootstrap'
,
'page'
);
$cache_
bin
s
=
array_merge
(
module_invoke_all
(
'flush_caches'
),
$core
);
foreach
(
$cache_
bin
s
as
$
bin
)
{
cache
(
$
bin
)
->
flush
();
}
// Rebuild the bootstrap module list. We do this here so that developers
...
...
modules/block/block.module
View file @
245db071
...
...
@@ -912,7 +912,7 @@ function block_flush_caches() {
_block_rehash
(
$theme
->
name
);
}
return
array
(
'
cache_
block'
);
return
array
(
'block'
);
}
/**
...
...
modules/field/field.module
View file @
245db071
...
...
@@ -421,7 +421,7 @@ function field_system_info_alter(&$info, $file, $type) {
*/
function
field_flush_caches
()
{
field_sync_field_status
();
return
array
(
'
cache_
field'
);
return
array
(
'field'
);
}
/**
...
...
modules/image/image.module
View file @
245db071
...
...
@@ -262,7 +262,7 @@ function image_system_file_system_settings_submit($form, &$form_state) {
* Implements hook_flush_caches().
*/
function
image_flush_caches
()
{
return
array
(
'
cache_
image'
);
return
array
(
'image'
);
}
/**
...
...
modules/system/system.api.php
View file @
245db071
...
...
@@ -2377,17 +2377,17 @@ function hook_mail($key, &$message, $params) {
/**
* Add a list of cache tables to be cleared.
*
* This hook allows your module to add cache
table name
s to the list of cache
*
tables
that will be cleared by the Clear button on the Performance page or
* This hook allows your module to add cache
bin
s to the list of cache
bins
* that will be cleared by the Clear button on the Performance page or
* whenever drupal_flush_all_caches is invoked.
*
* @return
* An array of cache
table name
s.
* An array of cache
bin
s.
*
* @see drupal_flush_all_caches()
*/
function
hook_flush_caches
()
{
return
array
(
'
cache_
example'
);
return
array
(
'example'
);
}
/**
...
...
modules/system/system.module
View file @
245db071
...
...
@@ -3004,10 +3004,10 @@ function system_cron() {
}
}
$core
=
array
(
'cache'
,
'
cache_
path'
,
'
cache_
filter'
,
'
cache_
page'
,
'
cache_
form'
,
'
cache_
menu'
);
$cache_
table
s
=
array_merge
(
module_invoke_all
(
'flush_caches'
),
$core
);
foreach
(
$cache_
table
s
as
$
table
)
{
cache
(
$
table
)
->
expire
();
$core
=
array
(
'cache'
,
'path'
,
'filter'
,
'page'
,
'form'
,
'menu'
);
$cache_
bin
s
=
array_merge
(
module_invoke_all
(
'flush_caches'
),
$core
);
foreach
(
$cache_
bin
s
as
$
bin
)
{
cache
(
$
bin
)
->
expire
();
}
// Cleanup the batch table and the queue for failed batches.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment