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
I was curious what you all thought about making an accessor for @_memo? I personally use it to memoize expensive methods and finders like what is done internally with references. It isn't too important, I just feel a little uncomfortable depending on a private variable like I am and also don't like patching reload_attributes to add a new hash that does the same thing as memo.
Thinking through some of the negatives, I noticed ohm-crystal doesn't memoize associations and maybe that is something you'd want to remove from ohm (ruby) as well? Also, I suppose users could clobber the existing memo keys unintentionally. I don't think it's worth it to update the reference helper to namespace associations on the memo hash, that seems like a user error if someone is using the same keys.
The text was updated successfully, but these errors were encountered:
Hi all,
I was curious what you all thought about making an accessor for @_memo? I personally use it to memoize expensive methods and finders like what is done internally with references. It isn't too important, I just feel a little uncomfortable depending on a private variable like I am and also don't like patching
reload_attributes
to add a new hash that does the same thing as memo.Thinking through some of the negatives, I noticed ohm-crystal doesn't memoize associations and maybe that is something you'd want to remove from ohm (ruby) as well? Also, I suppose users could clobber the existing memo keys unintentionally. I don't think it's worth it to update the reference helper to namespace associations on the memo hash, that seems like a user error if someone is using the same keys.
The text was updated successfully, but these errors were encountered: