[wp-hackers] Transient key best practice

Micky Hulse mickyhulse.lists at gmail.com
Mon Sep 9 20:42:10 UTC 2013


On Mon, Sep 9, 2013 at 1:30 PM, Nikola Nikolov <nikolov.tmw at gmail.com> wrote:
> Otto - doesn't setting transient's expiry time automatically remove it from
> the database once it's time's up? I haven't looked into core precisely how
> this works, but it would make sense for expired transients to get
> removed(during cron or whenever).

Great question!

On Mon, Sep 9, 2013 at 1:34 PM, Nicholas Ciske <nl at thoughtrefinery.com> wrote:
> Nope. It only gets removed the next time it's requested.

Good to know. I just assumed they got swept automatically.

Also, thanks for linkages.

> May be fixed in 3.7:
> http://core.trac.wordpress.org/ticket/20316
> There are plugins that use cron to clean up orphan records, but core does not... yet.
> http://wordpress.org/plugins/artiss-transient-cleaner/
> http://wordpress.org/plugins/delete-expired-transients/

More good links and info. That's helpful. Thanks! :)


More information about the wp-hackers mailing list