player; $api_type = $event->api_type; $filename = "json/{$player->pid}-{$api_type}"; if (!Storage::disk('cache')->has($filename)) { Storage::disk('cache')->put($filename, $player->generateJsonProfile($api_type)); } return Storage::disk('cache')->get($filename); } }