This repository was archived by the owner on Sep 9, 2020. It is now read-only.
Invalidate cache if linter path or arguments change (#19)#128
Open
siebert wants to merge 1 commit intosk-:masterfrom
Open
Invalidate cache if linter path or arguments change (#19)#128siebert wants to merge 1 commit intosk-:masterfrom
siebert wants to merge 1 commit intosk-:masterfrom
Conversation
7b0e7de to
3f3d2bd
Compare
sk-
suggested changes
Aug 31, 2018
Owner
sk-
left a comment
There was a problem hiding this comment.
Thanks @siebert for the PR. I added some comments, and you would still need to fix the e2e tests.
However the bigger question is regarding outdated cache files. As now without a readable name for the cache it's almost impossible to know which folders you could remove.
I think that an idea that incorporates your hash idea is to have a placeholder along the cache directory, something like:
cache
- python.hash
- python
- file1
- file2
- ruby.hash
- ruby
- file4
- file5
In that way whenever the hash changes you could remove the cache folder.
3b6185e to
689ab78
Compare
689ab78 to
e7e7734
Compare
Contributor
Author
|
@sk- Can you review the current patch again? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cache is not invalidated if the arguments (or path) of the linter program changes. To fix this I change the path where the cached data is stored. A sha256 hex hash value is appended of the linter name, which is created by hashing the linter program name and arguments.