Laravel 5.4 cache problems

Asked

Viewed 550 times

0

Hi, I’m having apparent cache issues on Laravel 5.4.
When I give a UPDATE in a form, I direct the user to the listing of records.
When you return to the editing form, the old data (before making the change) still appears.
Only when I refresh the page F5 the correct data appear.
For deletion criteria, I did a direct test by the controller (no view) and the problem continues.
I’ve performed procedures like:
php Artisan clear-Compiled
php Artisan cache:clear
php Artisan config:clear
Dump-autoload -o

I forced cache deletion on controller’s Construct Cache::flush();
But the problem still remains!

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

Have you been there? Thank you!

1 answer

0


Problem solved!!
The http package was with a browser saying parameter to keep that content cached for X time. I mean, no matter how hard I tried to tamper with Laravel’s cache files, nothing came of it.

Solution:
In the virtual host file NGINX on the line exhale I changed the parameter of max for off.

Thus remaining: exhale off;

In my case the file was located in: /etc/Nginx/conf. d
For more information, follow the documentation of NGINX:
http://nginx.org/en/docs/http/ngx_http_headers_module.html#expires

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.