-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Prefix $path for filename for internal file cache #14211
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
Conversation
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
|
|
||
| try { | ||
| if ($this->headObject($path)) { | ||
| if (isset($this->filesCache[$path]) && $this->headObject($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.
what is the reasoning here?
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.
If filesCache has been populated by opendir we already know that path is a file or not without calling headObject. If you wonder about "only call headObject if $path isset in filescache" 0d667d1
MorrisJobke
left a comment
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.
Code makes sense 👍
|
@kesselb @icewind1991 Backport to stable15? |
|
/backport to stable15 |
|
backport to stable15 in #14288 |
Follow-Up #11518
file1.txtfolder/file1.txtIf a file with the same name exists in a sub directory (prefix to be precise)
file1.txtis overwritten (the array key not the file itself) byfolder/file1.txt.getContentLengthandgetLastModifiedare called withfolder/file1.txtand the internal cache does not hit.