in reply to Memcached and arrays?

You're storing a reference to an array.

Might work -- "as per online documentation" -- if you dereference too.

Replies are listed 'Best First'.
Re^2: Memcached and arrays?
by expresspotato (Beadle) on Jan 21, 2010 at 05:31 UTC
    Upon further investigation it seems the values are being stored correctly. Thus I have no clue why @tmp = $memd->get("mem_id_cache") only returns the reference. This code seems to have worked.
    $tmp = $memd->get("mem_id_cache"); @tmp = @{$tmp};

      Because that's what you stored.

      Also, @tmp = @{$tmp}; makes a needless copy of the array. Just use $tmp instead of @tmp.

Re^2: Memcached and arrays?
by expresspotato (Beadle) on Jan 21, 2010 at 05:18 UTC
    Thanks for your reply. Storing @array yeilds nothing. Hashes and arrays of hashes seem to work fine. http://search.cpan.org/~kroki/Cache-Memcached-Fast-0.07/lib/Cache/Memcached/Fast.pm