Answer the question
In order to leave comments, you need to log in
How to make Laravel Octane (Swoole) cache scripts and styles?
Laravel Octane allows you to speed up your PHP application using one of two web servers: Swoole or RoadRunner. If we enable RoadRunner, then scripts (JS) and styles (CSS) have a Last-Modified header in the response, thus they are cached by browsers. If it launches Octane with Swoole, then it does not pass the header and scripts, styles, etc. are requested each time.
Actually, the question is how to still enable caching of these files or add the Last-Modified header to all files that have extensions .js, .css, .woff, etc.?
Answer the question
In order to leave comments, you need to log in
https://laravel.com/docs/8.x/octane#serving-your-a...
In production environments , you should serve your Octane application behind a traditional web server such as a Nginx or Apache . Doing so will allow the web server to serve your static assets such as images and stylesheets, as well as manage your SSL certificate termination.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question