mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 12:29:27 +01:00
DualIndexSQLiteObject: do not return partially cached object for get_data(x, y)
This commit is contained in:
parent
5e2dfff2cc
commit
9ad611dd60
@ -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 $data = eval {
|
||||||
my $sth = $self->{dbh}->prepare('SELECT * FROM Stuff WHERE index1 = ? AND index2 = ?');
|
my $sth = $self->{dbh}->prepare('SELECT * FROM Stuff WHERE index1 = ? AND index2 = ?');
|
||||||
$sth->execute($index1, $index2);
|
$sth->execute($index1, $index2);
|
||||||
|
Loading…
Reference in New Issue
Block a user