From d79a7d083ce8bc37df52ff42d6987554cc686760 Mon Sep 17 00:00:00 2001 From: hjp Date: Sat, 18 Jul 2020 08:52:00 +0000 Subject: [PATCH] Fix sessions_on_same_device cache This hasn't been working for at least 10 years. We treated the contents of the cache as a list of ids, but it was really a list of records. Now we just store the ids, since we don't need the rest of the info. --- lib/Simba/CA.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Simba/CA.pm b/lib/Simba/CA.pm index 4a99828..9546367 100644 --- a/lib/Simba/CA.pm +++ b/lib/Simba/CA.pm @@ -685,7 +685,7 @@ sub linkdup { my $dev = defined $st ? $st->dev : "";; next unless $dev eq $my_dev; last if $self->{sessions_on_same_device} && @{ $self->{sessions_on_same_device} } > 30; - push @{ $self->{sessions_on_same_device} }, $r; + push @{ $self->{sessions_on_same_device} }, $r->{id}; # We only use the id } }