Hi Bogdan,

> When does cache is purged ? In my case cache contains information from 
> previous iterations.

The update:cache function is non-deterministic: It will return
different results before and after items have been cached [1].

I have only used this function for a few tests and in some XQUnit test
cases. I don’t think there’ll be a reasonable use for it in productive
code.

> What is the scope of the PUL ?

Please have a look at other available online resources first (e.g. [2,3,4]).

> When I try get one item like this: update:cache()[1] I receive error:
> Item expected, sequence found: (0, 0).

Thanks for the hint, the static return type for this function in our
code base will be fixed in our next stable snapshot.

Cheers
Christian

[1] http://docs.basex.org/wiki/Update_Module#update:cache
[2] http://docs.basex.org/wiki/XQuery_Update#Concepts
[3] https://www.w3.org/TR/xquery-update-10/#dt-pending-update-list
[4] http://www.xmlmind.com/tutorials/XQueryUpdate/index.html

Reply via email to