[wp-hackers] how big objects can i cache using wp transient api?

Chris Scott cjscott69 at gmail.com
Fri Sep 30 18:18:17 UTC 2011


Note that if you're using an object cache backend the max value can be
much smaller (e.g. memcached is 1mb).

--
Chris Scott
http://iamzed.com/
http://hailtheale.com/



On Fri, Sep 30, 2011 at 9:52 AM, Otto <otto at ottodestruct.com> wrote:
> The option_value is longtext, which has a maximum size of 2^32-1
> (4,294,967,295) characters.
>
> In practical terms, the limit will be lower, but there's no particular
> issue with storing large data values in a transient. You may have
> speed issues in retrieving something that large from the database very
> often though. I'd suggest evaluating what parts of the data you
> actually need to use and store only those. If you're using the whole
> thing, then maybe another approach would work better, such as storing
> it in a custom post type.
>
> -Otto
>
>
>
> On Fri, Sep 30, 2011 at 5:41 AM, Konrad Karpieszuk
> <kkarpieszuk at gmail.com> wrote:
>> hello
>>
>> i cannnot find answer for this question. i have quite huge array which
>> i want to remember in transient. this array after serialization has
>> lenght over 300000 signs ( i check this using
>> strlen(serialize($my_array))
>>
>> will it be a problem for transient api?
>>
>> --
>> (en) regards / (pl) pozdrawiam
>> Konrad Karpieszuk
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> 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