发布

  • feat(core): add sqlite db for nx (#26891)

    frostbyte_neo 发布于 2024-08-21 17:12:20 +00:00

    Current Behavior

    Nx has some persistent storage managed as separate files on disk. For
    example, the local cache queries the file system for existing
    directories.

    Expected Behavior

    Nx has a new more performant persistent storage via SQLite database. The
    db is used for the following purposes now:

    1. Storing task details of different hashes (This serves as reference
      for other tables to get more information about a hash)
    2. Storing a record of cached artifacts
    3. Storing a history of tasks which have run

    The cache in particular has the following benefits:

    • It's faster, YMMV but it's definitely faster because it writes and
      reads less from disk.
    • It's able to track access of different cached artifacts
    • It purges cached artifacts more intelligently by looking at when
      artifacts were last ACCESSED rather than when they were CREATED. This
      will also eliminate cache misses due to the cached artifacts being
      purged simply because they were CREATED.

    Related Issue(s)

    Fixes #

    下载附件