mercredi 29 avril 2020

We need help to cache 60sec information in laravel

we need your help to cache information in laravel. I want cache random information 60 seconds and after 60 seconds when I click on the same value url again the url information would be new again.

Example:

url - domain.com/cats/2 <br>
It's take random from cats.txt file:<br>

Cats 1 - Richy,
Cats 2 - Tom,
Cats 3 - Luka <br>

And i want this information cache 60 seconds, after 60 second I again click url domain.com/cats/2 and information random from cats.txt new, exampe:

Cats 1 = Justin,
Cats 2 = Edvinas,
Cats 3 = Dzho.

Controller: https://pastebin.com/C4eLAYfw

Route: https://pastebin.com/3PuaL82L




Aucun commentaire:

Enregistrer un commentaire