[wp-trac] [WordPress Trac] #39591: Introduce wp_doing_cron()
WordPress Trac
noreply at wordpress.org
Mon Jan 16 10:18:15 UTC 2017
#39591: Introduce wp_doing_cron()
-------------------------+------------------------------
Reporter: tfrommen | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by tfrommen):
Replying to [comment:2 dd32]:
> Only nit-pick would be that the patch assigns the `$doing_cron` variable
in some cases where it'd otherwise be called repetitively, I'm not sure
that level of optimising is needed - but it can't hurt I guess.
I just followed that path of the `wp_doing_ajax()`
[https://core.trac.wordpress.org/changeset/38334 changes]. :) The
changeset didn't introduce new variables, but where it made sense, the
result of the check (using `DOING_CRON`) was cached.
And, yeah, caching data that is to be used multiple times (instead of
querying it multiple times) is not a bad idea, right? ;)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39591#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list