-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slight change in list admins cache expiry. #583
Slight change in list admins cache expiry. #583
Conversation
…dmins 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.
I feel it's good. |
Oh really? I thought it was introduced to fix performances problems. |
The cache caused tons of problems. |
Indeed but I thought it was fixed by now. But then again, I may have missed some conversations. |
We used up a whole package of band aids, but the patient haven't recovered yet 🙄. Caching incorrectly causes more harm than it helps, especially home grown solutions like we got introduced into Sympa. |
That should be a dedicated issue. |
…prevented the cache from being used by _cache_get(). PR sympa-community#583 introduced a bug: most of the time equals ; _cache_get() returned undef whereas the data was in cache.
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.