When you use Laravel's Cache class or facade, you also define a ttl, or time-to-live, that determines how long that item will remain cached for. You may have used a plain integer for this in the past. I'd like to show you a far better approach that will make your code easier to read and maintain.
A Pro subscription is required to watch this lesson.
For a small fee, get access to this episode and hundreds of hours of educational content from leading Laravel developers.
“Laracasts taught me more in one month than two years at university. Truly essential.
