3 ms·
The key explanation is: > Whenever a method is invoked with some arguments, those are used as a key that is mapped to IDs instead of objects. The objects are t
by Fabricio20 1y ago
The key explanation is:
> Whenever a method is invoked with some arguments, those are used as a key that is mapped to IDs instead of objects. The objects are then retrieved and returned from the ValuePool via their IDs.
You store the actual value on this value map, and then have a bunch of maps with references to this value map. When you update the entity, you can update the cache by updating "just" the value map. All other maps are automatically "updated" because they just reference the identifier (no-op). So you query these other maps to get the list of identifiers, then pull the actual values from the value map.
I get what its trying to do, its just not clear to me how it would handle updating the key-reference maps. If I change the value of a field (say name on a user entity), does it know to remove that entry (user_name_age map as an example) from the references map?
> The caches of the methods are only linked to IDs instead of transaction objects, so we won't need to update something there as long as an object is not deleted.