Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WP Plugins
Cron-Control
Commits
8d2d70c7
Verified
Commit
8d2d70c7
authored
Dec 03, 2016
by
Erick Hitter
Browse files
Skip the cache request when we don't need the value
parent
12fc3987
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/class-cron-options-cpt.php
View file @
8d2d70c7
...
...
@@ -67,10 +67,12 @@ class Cron_Options_CPT extends Singleton {
*/
public
function
get_option
()
{
// Use cached value for reads, except when we're unscheduling and state is important
$cached_option
=
wp_cache_get
(
self
::
CACHE_KEY
,
null
,
true
);
if
(
!
$this
->
is_unscheduling
()
)
{
$cached_option
=
wp_cache_get
(
self
::
CACHE_KEY
,
null
,
true
);
if
(
!
$this
->
is_unscheduling
()
&&
false
!==
$cached_option
)
{
return
$cached_option
;
if
(
false
!==
$cached_option
)
{
return
$cached_option
;
}
}
// Start building a new cron option
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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