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

Should we expire paths? #456

Open
brianmcgee opened this issue Oct 17, 2024 · 2 comments
Open

Should we expire paths? #456

brianmcgee opened this issue Oct 17, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@brianmcgee
Copy link
Member

Currently, if the formatter config never changes and the cache is not manually cleared, over time, we will start to accrue paths in the cache, which may have been removed from the underlying filesystem.

Should we implement some form of path expiry?

@brianmcgee brianmcgee added the enhancement New feature or request label Oct 17, 2024
@brianmcgee brianmcgee self-assigned this Oct 17, 2024
@brianmcgee brianmcgee mentioned this issue Oct 17, 2024
4 tasks
@jfly
Copy link
Collaborator

jfly commented Oct 17, 2024

IIUC, I believe this could get worse if we implement #455.

Not saying that it's bad right now, or that "worse" is bad either. For all I know, this file is, and always will be pretty small. I'll be keep an eye in it on my machine.

@brianmcgee
Copy link
Member Author

IIUC, I believe this could get worse if we implement #455.

I would think that mixing in the configuration in addition to the formatters executable mod time and size, this would increase the frequency with which the cache is busted.

Not saying that it's bad right now, or that "worse" is bad either. For all I know, this file is, and always will be pretty small. I'll be keep an eye in it on my machine.

I did a quick check to see what size the cache is for a fresh run on nixpkgs:

✦ ❯ du -sh ~/.cache/treefmt/eval-cache/59e2792a29a62e45fe4128041f748a75e4a87e28.db 
7.1M	/home/brian/.cache/treefmt/eval-cache/59e2792a29a62e45fe4128041f748a75e4a8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants