[wp-trac] [WordPress Trac] #61782: Memoize wp_get_wp_version
WordPress Trac
noreply at wordpress.org
Sun Aug 4 22:15:15 UTC 2024
#61782: Memoize wp_get_wp_version
------------------------------------+-----------------------------
Reporter: Cybr | Owner: SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.7
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+-----------------------------
Comment (by peterwilsoncc):
Thanks for looking in the stats, @Cybr.
I've reverted the commit for now but am leaving the ticket open to
consider performance improvements in the future as the function gains
wider use within Core.
I considered using a non-persistent cache to store the value and flushing
it during the upgrade but that failed the though experiment of managing
plugins modifying the value: the security through obscurity advise would
simply recommend changing both the global and the cached value.
Either a `$force` parameter or caching a boolean to determine if the value
has been populated may be possible.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61782#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list