markjaquith / WP-TLC-Transients

GNU General Public License v2.0
341 stars 37 forks source link

Key length issues #2

Closed aaroncampbell closed 13 years ago

aaroncampbell commented 13 years ago

The option_name field in the options table is varchar(64). Currently '_transienttimeout' + 'tlc_update' comes out to 31 characters, which means you only have 33 characters for $key. A common practice is to make $key an md5 prepended with something to make it obvious what it's for (twp_{md5}). By shortening tlc_update to allow longer keys you can allow a 37 character key. Then we limit the key length to 37 to prevent transient timeout key names from being too long.

aaroncampbell commented 13 years ago

After this pull request I started working on another project, which was retry_in. For some reason when I pushed that to my fork it added it here. I guess I need to learn more about branches in git, but I can't figure out how to remove it from this request.

markjaquith commented 13 years ago

https://github.com/markjaquith/WP-TLC-Transients/commit/945f760f557ab121b12be8f99aeacd779e5b40cb