cache
cache copied to clipboard
Avoid re-evaluation of the key input in restore implementation
Description
This PR fixes the re-evaluation of the key input for setting the cache-hit output in the restore implementation.
Motivation and Context
I noticed that the restore implementation re-evaluates the key input on setting the cache-hit output.
This does not cause any real issue, the change just refactors the code.
How Has This Been Tested?
I have run the unit tests restoreImpl.test.ts which covers the code I changed.
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (add or update README or docs)
- [x] Refactoring (non-breaking change which does not change the behavior)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.