...or will I be shooting myself in the foot?
I was disappointed that N/cache is server-side only, so I thought I might build a wrapper. I have a fairly slow-running module that's a little pokey on the server-side but it's intolerably slow client-side, and I'd like to improve it in both without too much yak shaving in each and every caller. So a quick cache wrapper made sense. I did something similar to what was described here, but when I went back to edit the script calling the wrapper module, I was greeted with "Fail to evaluate script: All SuiteScript API Modules are unavailable while executing your define callback", as has been discussed toward the end of this thread, as mentioned by ironside, which fizzled out due to the use of TypeScript.
TLDR: [LIST=1]
[*]Can't search for all units by internal id.
[*]I now search for all base units, load each record, load "uom" line items per record, concat results.
[*]Too slow, want to cache.
[*]N/cache is server only.
[*]Ok, then I'll wrap the module.
[*]Conditional module loading works as expected!
[*]NetSuite now won't allow editing calling module from the UI.
[/LIST] Any enhancement to 1, 4, or 7 would have spared me from this situation.