Random LRU cache cleared
When browsing a number of record larger than the cache size, we start to see performance degradation.
I could trace it to the filling of the cache in ModelStorage.__getattr__ with the read result. This is because the read result is not necessary in the same order as the list of ids. So the cache is filled using a random order and so when it starts to be cleared, it may clear an id that was not yet used in the loop. So the cache starts to have holes which triggers more read than expected and slow down the code.