Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: vuln-regex-detector: Persistent cache #26

Closed
davisjam opened this issue Apr 5, 2018 · 0 comments
Closed

client: vuln-regex-detector: Persistent cache #26

davisjam opened this issue Apr 5, 2018 · 0 comments

Comments

@davisjam
Copy link
Owner

davisjam commented Apr 5, 2018

This will make linting on dev machines go quickly.

jamesdonoh pushed a commit to jamesdonoh/vuln-regex-detector that referenced this issue Feb 13, 2019
Problem:
HTTP queries are slow.
We want to make as few as possible.
The existing memory-only cache does not persist across different
instantiations of the module, so we forget things.

Solution:
Introduce a persistent cache. This is now the default.

Details:
The cache lives in os.tmpdir().
The expected use case is on a developer's machine, where the
same projects will be queried over and over.
Any previously-answered queries will be resolved locally.
Only newly/recently-added regexes need contact the server.

Cached results do not expire.
If we add new detectors or otherwise change the definition of vulnerability
on the server side, we should add expiration into the client-side cache.

Fix:
This fixes davisjam#26.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant