[wp-hackers] Transients that are not re-used after their expiry are never garbage-collected

David Anderson david at wordshell.net
Fri May 3 09:18:04 UTC 2013


Just a heads-up for others who may not be aware of this - I was not 
until today, until I began to look at my options table with ~250,000 
entries in it (after 2 months!)...

WordPress does not garbage-collect transients unless you attempt to 
access them. This means that if you use transients with unique keys, or 
keys that are not expected to be used after a certain time (e.g. as 
access tokens), then they may never be purged.

Here's a simple plugin to provide temporary relief until this is fixed 
in core:

Trac ticket for the issue:

Best wishes,

WordShell - WordPress fast from the CLI - www.wordshell.net

More information about the wp-hackers mailing list