Closed algorithme closed 4 years ago
You are completely right, that's a bug.
However I would rather not introduce another, separate cache just for GetChampion
. I think atomically toggling a flag when GetChampions
has been called would be better.
If you want, you can open a PR with a fix, otherwise I'll do so, soon.
If you call GetChampion("Ashe") and then you call GetChampions(), you will only receive a list containing Ashe.
I'm not sure this is expected and I wonder if the cache used for GetChampion shouldn't be different.
IMHO, I would first check in GetChampions Cache if Ashe is available, then in GetChampion Cache and when I get the result I would only store it in GetChampion Cache.
If you want I can fix it for you ?