Commit 3f39f564 authored by David Verdin's avatar David Verdin
Browse files

When changing a list's admin two times in the same second, the list admins...

When changing a list's admin two times in the same second, the list admins cache is not updated. Consequently, when trying to add a third admin in the same second, the second one is not in the cache at the time.
Obviously it does not sound like a recurrent scenario and I met this problem when running a test file only.
However, it is possible that this happens more often when trying to make batch modifications in the shell. And also, it made my test fail which is an engineering problem: it could be misguiding about the cause of a test failure.
So I changed the expiration test, replacing "<" by "<=" and it solves the problem.
I don't see any side problem that could result from this change bu I commit it separately anyway because the cache is very sensitive.
parent 2766e0ef
......@@ -693,7 +693,7 @@ sub _cache_get {
$self->{_mtime}{$type} = $mtime;
return undef unless defined $lasttime and defined $mtime;
return undef if $lasttime < $mtime;
return undef if $lasttime <= $mtime;
return $self->{_cached}{$type};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment