-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jsscripting] Added simple Shared Cache into scope #11693
Conversation
Can be used like this:
Which will increment the counter each time the script is run. |
...jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/scope/SharedCache.java
Outdated
Show resolved
Hide resolved
Should we also expose |
Yes I think that's sensible. |
3023468
to
aad3c63
Compare
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
aad3c63
to
c8caff1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Jonathan Gilbert <jpg@trillica.com> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
Signed-off-by: Jonathan Gilbert <jpg@trillica.com> Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
Signed-off-by: Jonathan Gilbert <jpg@trillica.com> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Add a very basic shared cache into the JS add-on to allow JS scripts to cache objects between runs and/or scripts.
Signed-off-by: Jonathan Gilbert jpg@trillica.com