@benhutton What would you think about adding attributes.values to the default implementation of https://github.com/desiringgod/components-rails/blob/master/lib/components/rails/caching.rb#L26-L32`?
We're seeing a number of components where the #cache_key implementation is just attributes.values. Though there could be a case where a Component would not change based on an attribute provided and we wouldn't want the cache_fragment_name to change, that seems like an edge case and not a good reason to not implement this.
Also, if we do this, I think we could get away with not requiring #cache_key to be implemented. If #cache_key is implemented, it would effectively get added to this value.
Thoughts?
@benhutton What would you think about adding
attributes.valuesto the default implementation of https://github.com/desiringgod/components-rails/blob/master/lib/components/rails/caching.rb#L26-L32`?We're seeing a number of components where the
#cache_keyimplementation is justattributes.values. Though there could be a case where a Component would not change based on an attribute provided and we wouldn't want the cache_fragment_name to change, that seems like an edge case and not a good reason to not implement this.Also, if we do this, I think we could get away with not requiring
#cache_keyto be implemented. If#cache_keyis implemented, it would effectively get added to this value.Thoughts?