DualIndexSQLiteObject: do not return partially cached object for get_data(x, y)

This commit is contained in:
Pragmatic Software 2020-03-19 18:03:35 -07:00
parent 5e2dfff2cc
commit 9ad611dd60
1 changed files with 0 additions and 10 deletions

View File

@ -493,16 +493,6 @@ sub get_data {
}
}
if (grep { $_ ne '_name' } keys %{$self->{cache}->{$lc_index1}->{$lc_index2}}) {
my $d = {};
foreach my $key (keys %{$self->{cache}->{$lc_index1}->{$lc_index2}}) {
if (defined $self->{cache}->{$lc_index1}->{$lc_index2}->{$key}) {
$d->{$key} = $self->{cache}->{$lc_index1}->{$lc_index2}->{$key};
}
}
return $d;
}
my $data = eval {
my $sth = $self->{dbh}->prepare('SELECT * FROM Stuff WHERE index1 = ? AND index2 = ?');
$sth->execute($index1, $index2);