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

fix: use lru-cache for packuments #7463

Merged
merged 2 commits into from
May 7, 2024
Merged

fix: use lru-cache for packuments #7463

merged 2 commits into from
May 7, 2024

Commits on May 6, 2024

  1. deps: add lru-cache

    wraithgar authored and lukekarrys committed May 6, 2024
    Configuration menu
    Copy the full SHA
    f65ba6e View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. fix: limit packument cache size based on heap size

    This adds a new packument cache that is an instance of `lru-cache`.
    It uses that package's ability to limit content based on size, and has
    some multipliers based on research to mostly correctly approximate the
    correlation between packument size and its memory usage.  It also limits
    the total size of the cache based on the actual heap available.
    
    Closes: #7276
    Related: npm/pacote#369
    wraithgar committed May 7, 2024
    Configuration menu
    Copy the full SHA
    563a048 View commit details
    Browse the repository at this point in the history