[HttpFoundation] Explain the impact of the stat cache on the BinaryFileResponse #5268
Labels
actionable
Clear and specific issues ready for anyone to take them.
good first issue
Ideal for your first contribution! (some Symfony experience may be required)
hasPR
A Pull Request has already been submitted for this issue.
HttpFoundation
The result of a
filesize()
call as well as a call toSplFileInfo::getSize()
are cached to improve speed. However, as theBinaryFileResponse
relies on thegetSize()
method to return a proper HTTP response, it must be ensured thatclearstatcache()
is called before the response will be returned.For example, this behaviour led to some confusion in symfony/symfony#11102.
The text was updated successfully, but these errors were encountered: