-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Clear statcache before getting the mtime from local storage backends #10881
Conversation
Will this have any side effects / performance impact ? I guess no since this is about the local storage. |
🚀 Test Passed. 🚀 |
Did you try calling this in the text editor app instead and found out why it didn't work for the savefile.php ? |
@@ -130,6 +130,7 @@ public function file_exists($path) { | |||
} | |||
|
|||
public function filemtime($path) { | |||
clearstatcache($path); |
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 also needs the $this->datadir prefix?
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.
Good catch
c42d023
to
4519e2a
Compare
@bantu fixed |
🚀 Test Passed. 🚀 |
@icewind1991 see my question above: #10881 (comment) |
There is a cache miss involved for calls that look as follows now: filemtime() I am not sure whether this is large problem. I would probably just go ahead and give this a try. |
Please note that the modification time may also be fetched by making a stat() call. Attribute 9, see http://php.net/manual/en/function.stat.php. So maybe the cache should also be cleared for stat() calls. |
I'm ok with this 👍 |
@owncloud-bot retest this please |
🚀 Test PASSed. 🚀 |
4519e2a
to
db3f723
Compare
The inspection completed: 2 new issues |
🚀 Test PASSed. 🚀 |
Please also fix in MappedLocal.php |
Rebased, can this be merged? |
A new inspection was created. |
🚀 Test PASSed. 🚀 |
👍 |
Clear statcache before getting the mtime from local storage backends
@karlitschek @DeepDiver1975 @icewind1991 we need to backport this to stable7 to make the unit test of #14861 work (the rest works, only the unit tests requires that |
backport is fine 👍 |
Fixes #9614
cc @labkode @DeepDiver1975 @PVince81