in reply to Re: Memcached and arrays?
in thread Memcached and arrays?
my @items_to_stored = qw( a b c ); $memd->set("mem_id_cache", \@items_to_stored); my $stored_items = $memd->get("mem_id_cache"); print "$_\n" for @$stored_items;
Surely, that would only work, if at all, if you retrieve the array ref in the same process as you stored it. Otherwise the reference would just point to some random chunk of (probably unallocated) memory.
And what is the point of storing a ref in a cache then retreiving it, when you have direct access to the data it points to?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Memcached and arrays?
by ikegami (Patriarch) on Jan 21, 2010 at 06:17 UTC | |
|
Re^3: Memcached and arrays?
by expresspotato (Beadle) on Jan 21, 2010 at 06:05 UTC | |
by BrowserUk (Patriarch) on Jan 21, 2010 at 06:13 UTC |