[wp-hackers] varchar(64) on transient names
Haluk Karamete
halukkaramete at gmail.com
Fri Jun 13 05:59:54 UTC 2014
excellent answer. thx.
On Thu, Jun 12, 2014 at 10:46 PM, Nicholas Ciske <nl at thoughtrefinery.com>
wrote:
> A transient that doesn't expire has a max name length of 53 characters yet
> a transient that does expire has a max name length of 45 characters. So 45
> is always safe.
>
> This is because transients are just options with a prefix:
>
> _transient_ = 11 chars
>
> 64 - 11 = 53
>
> _transient_timeout_ = 19 chars
>
> 64 - 19 = 45
>
> More:
> http://stackoverflow.com/a/12416710
>
> Trac:
> https://core.trac.wordpress.org/ticket/15058
>
>
> _________________________
> Nick Ciske
> http://thoughtrefinery.com/
> @nciske
>
> On Jun 13, 2014, at 12:26 AM, Haluk Karamete <halukkaramete at gmail.com>
> wrote:
>
> > Schema says that it's got room for 64 chars.
> > But we are also advised to keep it at max of 45 chars
> > What takes up the 64-45?
> > $transient (*string*
> > <http://codex.wordpress.org/How_to_Pass_Tag_Parameters#String>)
> (*required*)
> > Transient name. Expected to not be SQL-escaped. Should be 45 characters
> or
> > less in length <http://core.trac.wordpress.org/ticket/15058>. @
> > http://codex.wordpress.org/Function_Reference/set_transient#Parameters
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list