Site Properties & Session Variables

Site Properties & Session Variables

  
I was doing some work on an application and I felt the need to clarify how Site Properties and Session Variables are handled by the platform. My understanding goes like this:
 
Site Properties - will be saved on the in-memory cache of the running application, which is isolated by eSpace (not shared between eSpaces).
 
Session Variables - values get written out to the database, also not shared across eSpaces and have builtin concurrency control.
 
In both, to pass a Site property or Session variable between eSpaces, I have to explicitly pass it and the best way to do it is by creating an action in producer (B) and reference it in consumer (A).
 
If I change, inside A, the Site Property of B, only B will actually acknowledge that change, while it's consumer A will not reflect the change on the Site Property.
But, If I make the same change process on a Session Variable, both B and A will acknowledge that change.
 
Is there something wrong on the above? Are there other important aspects regarding Site Properties or Session Variables that I may be missing?
Hi,

Well, the part about consumers/producers with site properties is not how it is supposed to work.
Changing a site property, regardless where, should invalidate all consumers automatically at the end of the request. Causing them to get the new value.
In older versions (before 7) this was not automatic and required an explicit call to the EspaceInvalidateCache action.

Check this topic that also explains how Site Properties and Session Variables work: http://www.outsystems.com/forums/discussion/11484/how-do-site-properties-work-under-the-hood/

Regards,
João Rosado
Hi João,
Thanks for making it clear and guiding me to the other post which I didn't find when searching this subject.

 Oi 
 
1) criar uma Aplicação com PublicActions nome
2) Criar um módulo com ações de nome
3) Criar a "variáveis ??de sessão global" na Sessão
4) Criar um SetSessionVariabel ()
5) Criar uma variável de entrada nesta função VarSessionVariabel chamada que vai receber o nome da variável de sessão e um com ValSessionVariable que vai receber o valor da variável de sessão
6) criar uma função de ação pública com GetSessionVariabel nome ()
7) criar uma variável de entrada VarSessionVariabel que receberá o variablename sessão e uma variável de saída com o nome de ValSessionVariabel que irá obter o valor da sessão e retornar para o chamador.
 
é isso aí
 
Ver Exemplo https://gyndaniel.outsystemscloud.com/Actions/HomePage.aspx