Hi Marco,

Sessions and databases is definitely what I would recommend here. Alternatively, could also store data to files on disk. If you need to store user data, user:update-info and user:info would be additional choices.

Reports from other users are welcome.
Christian








Am 04.02.2017 7:30 nachm. schrieb "Marco Lettere" <m.lettere@gmail.com>:
Hi BaseX community,

I'm wondering whether there is the possibility to keep some kind of in-memory state among successive RestXQ invocations.

I know I could use the session object but this comes at the risk of loosing the state at session expiration.

I could of course use a DB but with this solution I'm not sure that paying the overhead of accessing a database is worth for the small checks I need to perform.

I was thinking of using Java and create some sort of singleton but this would introduce an unnecessary dependency from a custom jar.

Maybe with the Jobs module? Any other clue?

Thanks,

Marco.