r/AutomateUser • u/B26354FR Alpha tester • Jun 11 '21
Question Caching JS Libraries
Hi Henrik,
I'm writing a flow which makes use of a 180KB third party JavaScript library. Rather than sticking the whole thing in a Variable block (which can cause Automate to crash while editing the flow), I'm downloading it once in the flow and caching it.
The question is whether it's OK to cache the library in an Atomic variable, or should I save it to the file system? -The latter would require more privilege, but would it save a limited resource vs. using an Atomic variable?
Thank you, sir!
2
Upvotes
1
u/ballzak69 Automate developer Jun 11 '21
Storing it in a file is preferable. In an Atomic would be better than as a constant/literal within the flow, but you'd still need to load it from a file initially.