I have an API Request for weather and the account of this weather stuff has a limitation of requests per minute. In my theme I have the weather information twice on the same page. So if I would make a function of the request it would fire twice. I thought about a global variable, where I could save the request once and grap this variable where ever I want.
Is this a good idea? I read something about, that global variables aren't a good choice!? Is there an other solution?