You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, to ensure encapsulation and ease of testing, a separate listener on the modules table can be initiated.
An alternative to a listener would be ensuring that edge_id cannot be changed via mass assignment, and it can be assumed to be static, removing the need to consider cache stagnation.
The
Module
toEdge
relation is very unlikely to change, so keeping a lookup will save a lot of queries, especially with a high volume of executes.To ensure correctness, updates to
edge_id
MUST be captured in a change listener.A simple place to do so would be below...
core/src/placeos-core/mappings/module_names.cr
Lines 17 to 24 in b938d43
However, to ensure encapsulation and ease of testing, a separate listener on the modules table can be initiated.
An alternative to a listener would be ensuring that
edge_id
cannot be changed via mass assignment, and it can be assumed to be static, removing the need to consider cache stagnation.Corresponding
TODO
core/src/placeos-core/module_manager.cr
Lines 256 to 262 in b938d43
The text was updated successfully, but these errors were encountered: