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

Npm client persistent cache #28

Merged
merged 2 commits into from
Apr 5, 2018
Merged

Npm client persistent cache #28

merged 2 commits into from
Apr 5, 2018

Commits on Apr 5, 2018

  1. client: npm: persistent cache

    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 #26.
    davisjam committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    a11f35f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97c761a View commit details
    Browse the repository at this point in the history