TCL.SCRIPT

TCL.SCRIPT LOAD script
TCL.SCRIPT EXISTS sha1 [sha1 ...]
TCL.SCRIPT FLUSH [ASYNC | SYNC]

Manage the Tcl script cache used by TCL.EVAL and TCL.EVALSHA. Behavior mirrors SCRIPT, on a cache that is independent of the PUC-Lua (SCRIPT), Luau (LUAU.SCRIPT), and Wren (WREN.SCRIPT) caches.

Example

> TCL.SCRIPT LOAD "return [string toupper hello]"
"c1a2b3..."

> TCL.SCRIPT EXISTS c1a2b3...
1) (integer) 1

> TCL.SCRIPT LOAD "set x {"
(error) ERR Error compiling script: script is not complete (unbalanced braces, brackets, or quotes)

> TCL.SCRIPT FLUSH
OK

See also