--[[
	Caches the character appearance of the specified userId
]]

function CharacterAppearanceCache.cacheCharacterAppearance(userId)
	coroutine.wrap(
		function()
			local success, appearanceAssets =
				pcall(
				function()
					return Players:GetCharacterAppearanceAsync(userId)
				end
			)

			if not success then
				Logger.warn("Failed to load character appearance for ", userId)
				return
			end

			appearanceCache[tostring(userId)] = appearanceAssets

			Logger.trace("Cached character model for", userId)
		end
	)()
end
