License being loaded unexpectedly in specs
While reviewing !85399 (comment 927714587) I discovered that Licence.load_license
was being called multiple times. When a preliminary request was made to warm up the cache, it resulted in additional Licence
loads rather than fewer, which is counterintuitive.
I thought that perhaps the License
value weren't being cached properly, or the cache wasn't being read properly.
My concern is twofold:
- The license cache isn't being read, it's being cleared somewhere OR some cache isn't performing the way we're expecting somehow, so there's a possible performance issue
- The extra License calls could be masking N+1s since we normally only check for one extra query, so an extra License call during a control query could mean there are potential N+1s not being caught by our specs.
Edited by charlie ablett