Skip to content
Snippets Groups Projects
Verified Commit 398780bf authored by Alberto Paderno's avatar Alberto Paderno
Browse files

Issue #3462904: apcu_clear_cache() deletes all the APCu keys instead of...

Issue #3462904: apcu_clear_cache() deletes all the APCu keys instead of deleting only the keys used for cached values
parent 3b05593f
No related branches found
No related tags found
1 merge request!21Issue #3462904: apcu_clear_cache() deletes all the APCu keys instead of deleting only the keys used for cached values
Pipeline #230984 passed
......@@ -53,10 +53,14 @@ function apc_form_system_performance_settings_alter(&$form, $form_state) {
* Submission form handler for system_performance_settings().
*/
function apc_clear_apcu_cache() {
// apcu_clear_cache() always return TRUE; that is why we show a single message
// without checking the return value.
apcu_clear_cache();
drupal_set_message(t('APCu cache has been cleared.'));
$iterator = new APCUIterator("/^apc_cache_/", APC_ITER_KEY);
if (apcu_delete($iterator)) {
drupal_set_message(t('The APCu cache has been cleared.'));
}
else {
drupal_set_message(t('The APCu cache could not be cleared.'), 'error');
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment