[wp-hackers] Transient key best practice

Micky Hulse mickyhulse.lists at gmail.com
Tue Sep 10 19:17:53 UTC 2013


One last comment for completeness's sake:

"The option_name field in the options table has a record length of 64
characters. So, taking into account the prefixes added to the
transient name, a transient name can only be a maximum of 45
characters (or 40 characters for network transients). The problem here
is that WordPress doesn’t check. It doesn’t fail either – it creates
the transients but simply truncates the name. And because each of the
transient record pairs has a different length prefix then they each
end up with a different name – this means the transient can’t be
retrieved."

Via: <http://www.artiss.co.uk/2013/05/using-transients>


More information about the wp-hackers mailing list