is it possible to store an array in memcached
Jeffrey Kacmarcik
jrkacmar at wisc.edu
Thu Jan 18 20:41:26 UTC 2007
no need to serialize it if you're using the pecl-memcache client. It
handles all of that for you -- associative arrays, objects, just about
anything you throw at it that's not a resource.
-Jeffrey
mike wrote:
> This is basically very basic PHP stuff. :) But yes, you can.
>
> I'm not sure if you even have to serialize it first. Might depend on
> the module you use.You can try without first. But otherwise, just
> serialize it and it will be a string that you can store. Then
> unserialize after you retrieve it.
>
>
>
> On 1/18/07, Alan Jay <alanj_sw3 at yahoo.co.uk> wrote:
>>
>>
>>
>>
>>
>> Hi,
>>
>>
>>
>> I am doing some tests with the idea to use Memcached to reduce the
>> load on
>> HTML servers. We want to cache articles which are held in an array
>> ($article_row) which contains a number of elements
>> $article_row[title] etc I
>> have been looking to see if there is syntax to store the entire array in
>> memcache so that once brought out the array can be manipulated (as it is
>> currently) and displayed as required.
>>
>>
>>
>> All suggestions gratefully received.
>>
>>
>>
>> Regards
>>
>> Alan Jay
>>
>>
--
Jeffrey Kacmarcik
Systems Programmer, Law School
University of Wisconsin - Madison
jrkacmar at wisc.edu
More information about the memcached
mailing list