--[[
	
	Grabs gamepass info - cleaner alternative to GetProductInfo. Caches and may potentially yield.
	
	Functions.GetGamepassInfo(
		id, 					<-- |REQ|	ID of gamepass. (w/o link)
	)
	
--]]




return function(id)
	--- Check cache
	if not cachedGamepassInfo[id] then
		--- Get product info
		local productInfo = _L.Services.MarketplaceService:GetProductInfo(id, Enum.InfoType.GamePass)
		
		--- Update cache
		if productInfo then
			cachedGamepassInfo[id] = productInfo
		end
		
		--
		return productInfo
	else
		
		--- Return cache
		return cachedGamepassInfo[id]
	end
end
