'Why is it advised to cache getBudget()?
Solution 1:[1]
The map isn't used to cache the budgets, it's to avoid doubling the same budget more than once.
If you were to remove that part of the code, a budget that is shared by multiple campaigns would be doubled the number of times it is used in an individual campaign (e.g. if a budget is used in 3 campaigns, it would be increased eightfold after you run the script).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | dorian |

