Hi all,
Another solution is to share a main memory database, that behaves like a memory cache. In Client/Server mode, any main memory created by one client is available to all the other ones.
Best regards, Fabrice
-----Message d'origine----- De : basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de] De la part de Marco Lettere Envoyé : mardi 5 septembre 2017 09:14 À : basex-talk@mailman.uni-konstanz.de Objet : Re: [basex-talk] Server Variables, cached vars, etc
On 05/09/2017 01:37, Erik Peterson wrote:
How can I create a variable that is evaluated only once but accessed across many RestXQ requests and sessions. I'm trying to cache data that comes from an integration with an expensive operation. Does BaseX support something similar to server variables like Mark Logic?
Hi Erik,
AFAIK you have the following possibilities to keep a variable live accross multiple RestXQ calls:
1) Use session http://docs.basex.org/wiki/Session_Module
2) Use a database which is builtin in BaseX and is very lightweight. Especially if your data is serializable to XML you could benefit also from indexes to speed up access to your cached objects.
3) Use the file system.
Hope this helps [cit] ;-)
Marco.