"Global" or session object

Enonic version: 6.6.2-SNAPSHOT
OS: Mac and Linux

Is there a “Global” object? To which I can write some stuff, in one place, and read from it another? :slight_smile:

Or at least a session object?

I guess if we could write to the context that would be an option?
http://repo.enonic.com/public/com/enonic/xp/docs/6.6.1/docs-6.6.1-libdoc.zip!/module-lib_xp_context.html#.get

A slow workaround would be JSON.stringify write to file in one place, and read from file, JSON.parse in some other place.

2 Likes

Per now sessions are not distributed - and everyone should strive to make their code as stateless as possible. That said, we will introduce distributed memory maps and sessions in future releases.