Skip to content

Commit

Permalink
Solved: Cache::Memcached rarly returns keys different to requested ones
Browse files Browse the repository at this point in the history
  • Loading branch information
sewi-cpan committed May 24, 2019
1 parent 90097e9 commit d09d0a9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/Data/ObjectDriver/Driver/BaseCache.pm
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,6 @@ sub lookup_multi {
my %id2key = map { $_ => $driver->cache_key($class, $_) } grep { defined } @$ids;
my $got = $driver->get_multi_from_cache(values %id2key);

## If we got back all of the objects from the cache, return immediately.
if (scalar keys %$got == @$ids) {
my @objs;
for my $id (@$ids) {
my $obj = $driver->inflate($class, $got->{ $id2key{$id} });
$obj->{__cached}{ref $driver} = 1;
push @objs, $obj;
}
return \@objs;
}

## Otherwise, look through the list of IDs to see what we're missing,
## and fall back to the backend to look up those objects.
my($i, @got, @need, %need2got) = (0);
Expand Down

0 comments on commit d09d0a9

Please sign in to comment.