-
Notifications
You must be signed in to change notification settings - Fork 789
Document touch() doesn't clear the stat cache. #4301
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,16 @@ if (!touch('some_file.txt', $time)) { | |
<refsect1 role="notes"> | ||
&reftitle.notes; | ||
¬e.filesystem-time-res; | ||
¬e.clearstatcache; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And likewise is this change wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then do we need a new entity for statcache impacting write functions? Because the root issue is I didn't realize touch didn't reset the cache, so couldn't understand why my touch() call didn't seem to do anything. So I want something on the touch page to indicate that. You and @Girgias figure out what you want there, I've already made two proposals and both of them someone has objected to. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
None of them impact the statcache (except for Note that I do not see a value-add in adding a reference to the statcache to every function that possibly affects the statdata and as far as I can tell all the functions reading from the statcache have the note already. |
||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably list There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. touch can modify both properties, so I listed them in alphabetical order. |
||
<simplelist> | ||
<member><function>clearstatcache</function></member> | ||
<member><function>fileatime</function></member> | ||
<member><function>filemtime</function></member> | ||
</simplelist> | ||
</refsect1> | ||
|
||
</refentry> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is wrong. This list lists the functions that read from the stat cache.
touch()
is a setter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description says nothing about read/ It just says "Affected."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The context is:
touch()
is not an affected function, because it does not interact with the stat cache at all. It does not (need to) know about it.