For technical information read the Laravel cache reference documentation.
use Illuminate\Support\Facades\Cache;
$data = "Hello world";
Cache::put("uniqueKey", $data);
$fallback = "Goodbye world";
$cachedData = Cache::get("uniqueKey", $fallback);
Cache::forget("uniqueKey");