Refactor `Relation#cache_key` is moved from `CollectionCacheKey#collection_cache_key`
The implementation of `Relation#cache_key` depends on some internal relation methods (e.g. `apply_join_dependency`, `build_subquery`), but somehow that implementation exists on the model class (`collection_cache_key`), it sometimes bothers to me. This refactors that implementation moves to `Relation#cache_key`, then we can avoid `send` to call internal methods.
Showing
想要评论请 注册 或 登录