Caching arg choices #83
johnlindquist
announced in
Roadmap
Replies: 1 comment 1 reply
-
|
For now i'm doing something like this, but would definitely use a cache feature if you end up doing something like the above |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Progress
Process
argchoices can use a function to generate choices. For scripts you use a lot with a low "time to live" (the main menu, an app launcher, etc), you'll want maximum speed. We can achieve this by caching results after the first run.Manually caching
What I've tried
The original plan was to set a third argument to
trueand have the App manage it:This became a HUGE hassle with sleepless nights due to cache invalidation and the app not having enough context of which script was running because scripts can load scripts, etc. The goal was to avoid even starting the script and only grab the cache (for maximum speed), but I've decided to table that approach until the architecture is more set. Caching at the Script level is still super fast and very much worth doing.
A
cachehelperI'm thinking
cachehelper like is probably worth making.I think there are enough scenarios where this would be useful to everyone.
Beta Was this translation helpful? Give feedback.
All reactions