in reply to Can Cache::Memcached::Fast distinguish timeout or not existing?

Something similar to this?
#!/usr/bin/perl use strict; use warnings; use Cache::Memcached::Fast; use Cache::Memcached; use constant count => 2; my %params; foreach my $h (@{$params{servers}}) { $h->{noreply} = 1 if ref($h) eq 'HASH'; } my $another = new Cache::Memcached::Fast(\%params); my @keys = map { "noreply-$_" } (1..count); $another->set_multi(map { [$_, $_] } @keys); my $res = $another->get_multi(@keys); my $count = 0; foreach my $k (@keys) { if ($res->{$k} and $res->{$k} eq $k) { print $res; } else { print "Nothing\n"; } }
  • Comment on Re: Can Cache::Memcached::Fast distinguish timeout or not existing?
  • Download Code

Replies are listed 'Best First'.
Re^2: Can Cache::Memcached::Fast distinguish timeout or not existing?
by Anonymous Monk on Jun 29, 2012 at 03:13 UTC

    Something similar to this?

    Hmm, lets try that , question: Can ... distinguish timeout or not existing ?

    Answer: Something similar to this?

    Hmm, the question something similar? doesn't answer Can .. yes or no?

    Also, the code doesn't answer the question either

    Too bad

      You didn't answer the question either. Too bad. Post your solution, please.