Skip to content

LocalFilesystemAdapter. Call clearstatcache in several methods #1873

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

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

pvandommelen
Copy link

Php's statcache caches the results of some file functions like is_file or filesize.

For the visibility() method, a clearstatcache is already used to clear this cache, but this is not the case for several other methods.

Fixes #1826

@frankdejonge
Copy link
Member

Can you add a configuration option to opt-in to this behaviour?

@pvandommelen
Copy link
Author

Thanks for the quick reply! Do we really have to have a configuration option for this?

clearstatcache is already used in the visibility method, which would probably also be affected by such an option. Something similar is also implemented in ensureDirectoryExists.

As mentioned in the issue, this commit would mostly reapply an older fix (6f2211c). Though that's on a much older release.

If you'd still like a configuration option, I can add one. But I think we should then move the existing clearstatcache calls behind that check.

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

Successfully merging this pull request may close these issues.

LocalFilesystemAdapter::fileSize(),fileExists(),directoryExists and possible other method uses cached values
2 participants