Evaluates the specified script and the result is returned. If the
sctx
is provided and cache is upto date, cached script will be evaluated instead of the original one. Otherwise, a either cache will be updated or evaluated the script directly without caching.
A clone of the engine scope will be used as the scope during the evaluation.
@param scriptReader Reader object to read the script when ever needed
@param sctx Script caching context which contains caching data. When null is passed for this, cachingwill be disabled.
@return Returns the resulting object after evaluating script
@throws ScriptException If error occurred while evaluating