Some of the data retrieval or processing tasks performed by an application could be CPU intensive or take several seconds to complete. When this is the case, it is common to cache the retrieved data for a time so it can be retrieved quickly on subsequent requests for the same data. The cached data is usually stored in a very fast data store such as Memcached or Redis. Thankfully, Laravel provides an expressive, unified API for various cache backends, allowing you to take advantage of their blazing fast data retrieval and speed up your web application.
More info can be found here: https://laravel.com/docs/8.x/cache
Sample:
$record = cache()->remember("records.{slug}",1200,fn() => file_get_contents($path));
The above code remembers a given $record content [ fn() => file_get_contents($path) ] for 1200 seconds (or 20 minutes).