[wp-trac] [WordPress Trac] #37040: Enhancement: new function to validate a transient exists, and isn't expired without extra query
WordPress Trac
noreply at wordpress.org
Fri Jun 10 21:00:20 UTC 2016
#37040: Enhancement: new function to validate a transient exists, and isn't expired
without extra query
--------------------------------+------------------------------
Reporter: danieliser | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------------+------------------------------
Comment (by danieliser):
@MikeHansenMe: My pleasure. Will see what I can come up with though my
ideal / proposed solution would be to simply move the initial check for a
time value would simply be moved to an external function, then called in
place.
Ideally no real change to the existing methods already there, just a
separation into a reusable method.
In the future though some core calls could use the new method to reduce
unneeded queries. Though I think its use becomes more evident with a large
production site with a large mix of plugins & theme functionalities.
Personally I only tend to use transients to store a timer, then store the
actual data as an option so that autoload handles it unless not needed,
though I have always wondered personally why the transients are not
autoloaded in general as they tend to be checked quite often.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37040#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list