Expiry header in Laravel for performance | Cache your API response on client to save API call

preview_player
Показать описание
In this performance optimisation video on Laravel, I am going to show you how we can save a round trip to the server for an API call by using the Expires header. The idea is, that if there are URLs where data is not changing frequently, then we should use the Expiry headers to let the client (browser know) about the expiry time. So, the browser will not make any API call till the response time expires or it becomes stale.
Рекомендации по теме
Комментарии
Автор

It uses the newer Cache-Control headers rather than Expires.

Hiandbye
Автор

And what will happen if we change user data via another API call? User information will be outdated until the fixed time passed or there will be a request time flushing mechanism?

artem
Автор

it would be better if you show routes guard using react js

pujadas