Open
![@ghost](https://github.com/ghost.png?size=80)
Description
This issue is automatically created based on existing pull request: #27142: Added getScopeCacheKey in order to define the right cache key based on store ID
Description (*)
This PR adds an small improvement to the instance cache into the categories repository cause it allows to receive store id or store code for attributes data retrieval but at the same time this store id / code is used as cache key which make it a double unnecessary category load when you request the category by same given store, first providing the store id and then providing store code.
Manual testing scenarios (*)
- Into your own class load the category repository via di.
- Use the category repository to get a given category providing an specific store ID. Check the given category got stored into the cached instances array of the repository under the store ID.
- Use the category repository to get a given category (same category as previous point) providing a specific store Code (same store as previous point). Error should be thrown with this fix, otherwise it was loading again the category filtering by store code which is incorrect based on PHP Docs into the interface.
Questions or comments
Have in mind this issue is not reproducible from REST API given it enforces to use the store ID based on the PHP Docs from the interface.
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- All automated tests passed successfully (all builds are green)
Metadata
Assignees
Labels
Gate 1 Failed. Automatic verification of issue format is failedNo current plan to fix. Fixing can be deferred as a logical part of more important work.Affects non-critical data or functionality and does not force users to employ a workaround.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it