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

Manifest cache one key per file doesn't make any sense #11525

Open
4 tasks done
lekoala opened this issue Jan 6, 2025 · 0 comments
Open
4 tasks done

Manifest cache one key per file doesn't make any sense #11525

lekoala opened this issue Jan 6, 2025 · 0 comments

Comments

@lekoala
Copy link
Contributor

lekoala commented Jan 6, 2025

Description

Currently, there is one cache key per file as per

$key = preg_replace('/[^a-zA-Z0-9_]/', '_', $basename ?? '') . '_' . md5_file($pathname ?? '');

i don't know if it's the case for others, but in my case, most of the cache ends up in one file, while 2342 get created

image

this leads to a lot of I/O when using file based cache

there should be a way to have only one key being used. this would allow to load the cache from file only once, not having to make a cache hit for each single file
actually, i believe what is supposed to be lighter (one key per file to only change the files that have been changed) actually leads to a much heavier process when you could simply dump the whole array only once.

Additional context or points of discussion

No response

Validations

  • You intend to implement the feature yourself
  • You have read the contributing guide
  • You strongly believe this feature should be in core, rather than being its own community module
  • You have checked for existing issues or pull requests related to this feature (and didn't find any)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant