Just save it like anyother object.
Object value = null ;
if (value = cache.get("yourkey") == null)
  value = new LinkedList()

value.addAll(your_array_of_data) ;

Should work
Siddharth

2012/2/4 可冰 <[email protected]>

> how you save LinkedList into memcached?
> 在 2012-2-4 凌晨1:12,"Siddharth Jagtiani" <[email protected]>写道:
>
> Robert,
>> I am doing something similar. A full populate of my DB to memcached. It
>> works for me. The only pitfall I had was clashing primary key's. So I used
>> a LinkedList to store data into, so that with one key I can save multiple
>> values.
>>
>> Siddharth
>>
>> On Fri, Feb 3, 2012 at 6:02 PM, Robert Hanson <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> I have a plan to do this scenario using PHP and Memcached on my Social
>>> Networking project, please correct me if I'm wrong :
>>>
>>> just like any other social networking site out there, mostly users just
>>> 'read' database content, instead of 'writing' it. right?
>>>
>>> so, I have a plan to 'read' EVERYTHING from the database once the user
>>> login (session created), such as : number of friends, birth date, today
>>> friend's post, etc then store it into Memcached server.
>>>
>>> unless the user logged out or click 'yesterday friend's post', user
>>> won't read the database again but read all the data from Memcached.
>>>
>>> maybe it will act like Gmail, user will see loading bar when they login
>>> into their account. but once they have it, everything runs faster.
>>>
>>> is this possible thing to do with Memcached?
>>>
>>
>>

Reply via email to