In cache.py:KeyHandler.get_multi_generation(...) a key is formed by mixing the current generations of all the tables involved. This means that if any of the tables are updated a new key will be derived.
What doesn't make sense to me is that this key is then used in a key -> generation lookup. Why not just use this derived value (currently called key) as the generation for that combination of tables? It would save a get and possibly a set operation.
In other words if we have table A with generation Ag1 and table B with generation Bg1 then it is sufficient for the generation of (A, B) to be calculated as (Ag1 ^ Bg1) and there is no need to store/lookup a random value using (Ag1 ^ Bg1) as the key.
Or am I missing something?
In cache.py:KeyHandler.get_multi_generation(...) a key is formed by mixing the current generations of all the tables involved. This means that if any of the tables are updated a new key will be derived.
What doesn't make sense to me is that this key is then used in a key -> generation lookup. Why not just use this derived value (currently called key) as the generation for that combination of tables? It would save a get and possibly a set operation.
In other words if we have table A with generation Ag1 and table B with generation Bg1 then it is sufficient for the generation of (A, B) to be calculated as (Ag1 ^ Bg1) and there is no need to store/lookup a random value using (Ag1 ^ Bg1) as the key.
Or am I missing something?