atom feed5 messages in com.googlegroups.memcachedRe: memcache and perl question
FromSent OnAttachments
Joseph NorrisNov 24, 2015 8:05 am 
Perrin HarkinsNov 24, 2015 9:07 am 
Joseph NorrisNov 24, 2015 9:21 am 
Perrin HarkinsNov 24, 2015 9:29 am 
Joseph NorrisNov 24, 2015 3:52 pm 
Subject:Re: memcache and perl question
From:Joseph Norris (joze@gmail.com)
Date:Nov 24, 2015 3:52:18 pm
List:com.googlegroups.memcached

Yes that is the point - I need an area to store a hash outside of my plack cycle. Local hashes get overwritten because plack spawns a new child through each cycle.

thanks.

On Tuesday, November 24, 2015 at 10:29:17 AM UTC-7, perrin wrote:

On Tue, Nov 24, 2015 at 12:21 PM, Joseph Norris <joze@gmail.com <javascript:>> wrote:

process 1 -> set($tag1,$hash); data unique to process 1 process 1 -> get($tag1,$hash); process 2 -> set ($tag2,$hash); data unique to process 2 process 2 -> get($tag2,$hash);

I'm not sure what you're trying to do. Assuming that $tag ne $tag2, there is no data being shared here and no point to using memcached. The normal thing would be for the key to be the same in both processes so they can both get and set the same data. The actual hashes in local memory are different of course.

each process must have a unique key to manipulate the hash via set and get

No, if they each have a unique key, they will be looking at totally different data in memcached and not sharing.

- Perrin