ok @adam i tried you solution and it kinds of work ^^
i’m saying this, because it’s not totaly what i was looking for …
when i mentionned that i had a cache variable holding pssession i meant more than one Exo session.
And even with one session i dont think i can use your example, because, when the session dies, i will be forced to recreate the session, when a user makes a call to the endpoint, by calling the function.
This will crumble the performance of the endpoint as i have to wait for the creation of the session.
(dunno if i’m clear … )
What i’m doing right now with UD (old version … ): I have a schedule route, that will manage the
Exo sessions for me … when a session dies, it will recreate a new one, and the user experience will be intact.
I had the same mechanism for refreshing some cache variable imported from big csv ( the csv were also generated using some scheduled endpoints.). For this, i think i can use the PSUCache cmdlet and a PSU Schedule + PSU Script. Or maybe switch to a real Database + a PSU Schedule.
If i’m not very clear (sorry english is not my primary language) i can show you some code sample of how i managing it with my old UD.
the question is: can we hope for a cache variable scope that is available through the whole product ? or maybe available for the Rest api part ??