You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, I use file responses for protected files. Each request make a query to the database to retrieve the path of the file and then return the response.
Put the file in browser cache could avoid to make this call 20 times for the same file/same user.
Description:
The middleware "SetCacheHeaders" (cache.headers) doesn't work with file responses because in this case "! $response->getContent()" seems to be empty: https://github.com/laravel/framework/blob/9.x/src/Illuminate/Http/Middleware/SetCacheHeaders.php#L24
I use a simple response like that: https://laravel.com/docs/9.x/responses#file-responses
Is it normal or it is a bug?
The text was updated successfully, but these errors were encountered: