b3ross / dotenvi

A simple library for generating dotenv files
MIT License
17 stars 7 forks source link

Add simple map to cache DescribeStacks calls and avoid calling multip… #69

Closed magichair closed 3 years ago

magichair commented 3 years ago

…le times

I've tested and verified against CloudTrail calls to see that only one call per-stack is called, even if multiple outputs are requested.

Sample:

outputX: ${cft:Stack1.outputX}
outputY: ${cft:Stack1.outputY}
outputFoo: ${cft:Stack2.outputFoo}

Before - This makes three describeStacks calls, getting (likely) identical data each time for the two Stack1 calls. After - This makes two describeStacks cals, caching the result of the Stack1 lookup.

magichair commented 3 years ago

@b3ross I'd add you as a reviewer but I think you control that. However, would love if you could take a quick look over this and see if you could accept this caching change. Thank you 🙇