Cache feature does not work
See original GitHub issueDescribe the bug Running betterer with --cache flag multiple times does not actually make anything calculate faster. Despite code not being changed, all comands run and for example recompile Typescript.
To Reproduce
If possible please share a repo with the issue, or another repository which demonstrates the issue.
If possible please include the .betterer.ts
file, and the .betterer.results
file if applicable.
At a minimum please share the command you are using to run Betterer.
Expected behavior Running command twice with --cache flag makes second run instant.
Screenshots
Versions (please complete the following information):
System:
- OS: macOS 11.6
- Memory: 35.78 MB / 16.00 GB
Binaries:
- Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
- Yarn: 1.22.17 - /usr/local/bin/yarn
- npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Languages:
- Bash: 3.2.57 - /bin/bash
Betterer:
- 5.0.0-alpha.0
Debug log:
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Why is caching not working? - Help Center - Servebolt.com
When cache is not working as expected, the first thing you want to check is to see wether any caching is happening at...
Read more >Fixed: Google Chrome is waiting for cache issue on Windows 10
Don't continue waiting for the cache issue on Windows 10 to clear on Google. Use these simple troubleshooting solutions to fix the issue...
Read more >What is a cache? And why does clearing it fix things? - Zapier
That's all the cache is: the place where your browser stores images, code, and other files to avoid re-downloading them repeatedly. Your browser ......
Read more >TroubleShooting: Dynamic cache - IBM
Troubleshooting for dynamic cache problems with WebSphere Application Server. This should help address common issues with this component ...
Read more >Identifying 10 common web site caching issues and their ...
SOLUTION: Can be resolved by clearing browser cache and restarting browser. Sometimes, even a simple hard refresh without restarting a browser ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If it was a problem with betterer’s file caching, I think it would be either:
But the more likely explanation in our case is that code that didn’t pass the betterer ci check made it into master.
As far as caching goes, it was definitely faster; tsc might be able to more reliably address 1 & 2 above, or betterer might be addressing them well enough, I don’t know. My only guess would be that 1 is trickier than it looks because it can involve type inference as well as exports/imports. Like, a change to a type can break files that import related functions but don’t import the type itself. But the fact that we had a problem does not mean that 1 or 2 was the problem.
Not sure if this is related but were facing something similar with
betterer cache
when changing branches. If we change to a new branch sometimesbetterer cache
fails with errors that seem like some types are missing from external libs.Deleting the
cache
or bypassing the cache results in no errors.We ended up not using the cache for typescript for now.