Name

xpath_eval__w_cache, xquery_eval__w_cache, xpath_funcall__w_cache, xpath_apply__w_cache — cache-aware XPath and XQuery evaluators

Synopsis

any xpath_eval__w_cache( in xpath varchar,
  in entity XML,
  in max_results integer,
  in variables any);
 
any xquery_eval__w_cache( in xquery varchar,
  in entity XML,
  in max_results integer,
  in variables any);
 
any xpath_funcall__w_cache( in function_name varchar,
  in entity XML,
  in args any);
 
any xpath_apply__w_cache( in xpath varchar,
  in entity_seq any,
  in variables any);
 

Description

These BIFs are the compiled-expression-cache aware counterparts of xpath_eval, xquery_eval, xpath_funcall and xpath_apply. The double-underscore __w_cache suffix marks them as safe to memoise across repeated invocations: when the same XPath or XQuery source string is evaluated again the compiled tree is reused, so the cost of parsing and optimising the expression is paid only once per expression per server lifetime.

Use these variants in hot paths where the expression is constant (or comes from a small set), such as VSP page handlers and stored procedures that fan out the same XPath over many documents. For one-off or fully dynamic expressions the non-cached variants impose less memory pressure on the compiled-expression cache.

The argument shape and return value are identical to the non-cached BIFs.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®