Problems with caching in Laravel 5.4

0

Hello, I'm experiencing problems with caching in Laravel 5.4. When I give an UPDATE on a form, I direct the user to the listing of records. When I return to the edit form of the same, the old data (before making the change) still appear. Only when I refresh the F5 page does the correct data appear. For elimination criteria, I did a direct test by the controller (no view) and the problem continues. I have already performed procedures like:
php artisan clear-compiled php artisan cache: clear dpp-autoload composer -o

I forced the cache exclusion in the constructor of the controller Cache :: flush ();
But the problem still continues!

My application is running on a DigitalOcean VM (CENTOS - NGINX - PHP7)

Have you been through this? Thanks!

    
asked by anonymous 19.07.2017 / 05:22

1 answer

0

Problem solved !!
The http packet had a parameter telling the browser to keep that content cached for X time. That is, as much as I tried to tinker with Laravel's cache files, nothing worked.

Solution:
In the NGINX virtual host file on the expires line, I changed the max parameter to off .

expires off;

In my case the file was located at: /etc/nginx/conf.d
For more information, follow the NGINX documentation:
link

Sintaxe:    expires [modified] time;
expires epoch | max | off;
Padrão: 
Expira;
Contexto:   http, server, location,if in location
    
20.07.2017 / 01:13