Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
apc
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
apc
Commits
1850c649
Verified
Commit
1850c649
authored
7 months ago
by
Alberto Paderno
Browse files
Options
Downloads
Patches
Plain Diff
Follow-up to
#3463517
: Added a call to apcu_enabled() to a form submission handler as safeguard
parent
3f77e08c
No related branches found
No related tags found
No related merge requests found
Pipeline
#232977
passed
7 months ago
Stage: build
Stage: validate
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apc.module
+9
-4
9 additions, 4 deletions
apc.module
with
9 additions
and
4 deletions
apc.module
+
9
−
4
View file @
1850c649
...
...
@@ -74,13 +74,18 @@ function apc_form_system_performance_settings_alter(&$form, $form_state) {
* Submission form handler for system_performance_settings().
*/
function
apc_clear_apcu_cache
()
{
$iterator
=
new
APCUIterator
(
"/^apc_cache_/"
,
APC_ITER_KEY
);
if
(
apcu_enabled
())
{
$iterator
=
new
APCUIterator
(
"/^apc_cache_/"
,
APC_ITER_KEY
);
if
(
apcu_delete
(
$iterator
))
{
drupal_set_message
(
t
(
'The APCu cache has been cleared.'
));
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'
);
}
}
else
{
drupal_set_message
(
t
(
'
The
APCu
cache could not be clear
ed.'
),
'
error
'
);
drupal_set_message
(
t
(
'APCu
is not enabl
ed.'
),
'
warning
'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment