Skip to content

use checksum instead of mtime for caching to enable CI caching #11319

@ashanbrown

Description

@ashanbrown

The version of ESLint you are using.
Latest.

The problem you want to solve.
I want to be able to restore an eslint cache file from a cache on CI and speed up my build.

Your take on the correct solution to problem.
By storing the checksum of a file instead of the mtime in the cache file, I can restore the eslint cache file from a cache in CI and use it shave about 30 seconds off my build time in a repo I'm currently working with. My understanding is that mtime is not set to anything meaningful during a git checkout and that the processing effort required to restore mtime to the git modification time would defeat much if not all of the value of a cached eslint cache file. This could be an optional step, where we continue to allow mtime for faster local caching but have an option to store a chksum for use with CI (and let that chksum take precedence over mtime).

Are you willing to submit a pull request to implement this change?
If I have to, I guess. ;) Sure, why not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    archived due to ageThis issue has been archived; please open a new issue for any further discussionauto closedThe bot closed this issuecoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions