From: Eduard D. <ed...@fr...> - 2020-12-20 13:23:35
|
Thanks, but, xquery has no static. And if I do declare variable $x := mod:func(); either or not in an imported module, mod:func() gets executed with every request I suspect, but correct me if I am wrong. Regards, Eduard -----Original Message-----From: Jean-Paul Rehr <re...@gm...>To: Eduard Drenth <ed...@fr...>Cc: exi...@li... <exi...@li...>Subj ect: Re: [Exist-open] static variables?Date: Sun, 20 Dec 2020 13:03:35 +0100 I accomplish this with a module that just has my "global variables" for use across the application. This "global variable" module is literally only populated with static variables which I can then declare and import as needed in my queries. I keep a lot of static configuration data and reusable path strings in them..... On Sun, Dec 20, 2020 at 12:45 PM Eduard Drenth < ed...@fr...> wrote: > Dear all, > > For performance reasons I want to be able to work with static > variables. My data in exist is readonly. > > I get the impression that variables are evaluated on every request > normally, so if I do: > > declare variable $teidictjson:data := .... > > this variable is request scoped. Can I somehow make that static or > application scoped? Or is the cache module the only way? > > Bye, Eduard > -- > Eduard Drenth, Software Architekt > > ed...@fr... > > Doelestrjitte 8 > 8911 DX Ljouwert > +31 58 234 30 47 > +31 62 094 34 28 (privé) > > skype: eduarddrenth > https://github.com/eduarddrenth > frisian.eu > gpg: https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth > > > Op freed bin ik thús/wurkje ik minder > > > > > _______________________________________________ > > Exist-open mailing list > > Exi...@li... > > https://lists.sourceforge.net/lists/listinfo/exist-open > -- Eduard Drenth, Software Architekt ed...@fr... Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 +31 62 094 34 28 (privé) skype: eduarddrenth https://github.com/eduarddrenth frisian.eu gpg: https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth Op freed bin ik thús/wurkje ik minder |