question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add cache option to avoid processing unchanged files

See original GitHub issue

Environments:

  • Prettier Version: 1.16.4
  • Running Prettier via: CLI (package.json script)
  • Runtime: Node.js 8.11.3
  • Operating System: MacOS 10.13.6

Steps to reproduce:

N/A

Expected behavior: That when provided with an option such as --cache, prettier only process new or changed files. See eslint for example.

Actual behavior: Prettier processes all files, whether they have changed or not.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:50
  • Comments:34 (20 by maintainers)

github_iconTop GitHub Comments

28reactions
RomanLubushkincommented, Feb 2, 2021

@mbrookes @g-harel Hey guys, is there any chance to see this amazing improvement live? Without cache, Prettier becomes a slowing part of a dev process. Specifically for my project:

Prettier - Done in 46.65s.
ESlint (with cache enabled) - Done in 1.80s.
4reactions
SalvatorePreviticommented, Jan 4, 2022

No updates here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Caching in GitLab CI/CD
A cache is one or more files a job downloads and saves. Subsequent jobs that use the same cache don't have to download...
Read more >
11.4 Cache time-consuming code chunks - Bookdown
One way to do it is to add another chunk option cache.extra = file.mtime('my-precious.csv') or more rigorously, cache.extra = tools::md5sum('my-precious.
Read more >
Maintaining cache content - IBM
Cached files must be checked for freshness and invalidated when they are no longer consistent with the files on the origin server. Invalidated...
Read more >
Prevent unnecessary network requests with the HTTP Cache
How can you avoid unnecessary network requests? The browser's HTTP Cache is your first line of defense. It's not necessarily the most ...
Read more >
Guide for Caching and HTTP Cache Headers for Static Content
How to Invalidate Cache - Different Methods And Caveats · Browser cache can't be purged unless you change the URL, which means you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found