[wp-trac] [WordPress Trac] #22807: Updating a non-expiring transient with a new expiry date does not make it expire
WordPress Trac
noreply at wordpress.org
Fri Jan 31 19:09:35 UTC 2014
#22807: Updating a non-expiring transient with a new expiry date does not make it
expire
--------------------------------------------+--------------------
Reporter: bersbers | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Options, Meta, Transients APIs | Version: 3.4.2
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
--------------------------------------------+--------------------
Changes (by nacin):
* keywords: => needs-patch needs-unit-tests
* milestone: Awaiting Review => 3.9
Comment:
Sounds legit. set_transient() properly sets the expiration but
get_transient() only looks for an expiration if it is autoloaded.
In set_transient(), we should do a check (when an expiration is supplied)
whether the option is already autoloaded. If it is, we should delete it,
then let the existing code in set_transient() re-add it.
This needs unit tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22807#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list