Site Property

  

Hi,

Updating Site property during run time is not a good practise.


My question what happens if the site property is changed during a request. Will the changed value remains only for that particular request or for all the requests?

Hi,


It will available for all request once u update.


Thanks!

Hi Ajithkumar Radhakrishnan, 

if you changed site property during a request this value is changed for particular user request, than when you close your browser site property will set default value. if you not close your browser site property exsist.

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/

One more question over the same,

I have set the dynamic value for site property but in the next step of my action application has thrown error.

Is the value set to site property remains or the default value remains?




Ajithkumar Radhakrishnan wrote:

One more question over the same,

I have set the dynamic value for site property but in the next step of my action application has thrown error.

Is the value set to site property remains or the default value remains?





Site property remains

Solution

Hi guys,

As said by Joao Rosado on thread http://www.outsystems.com/forums/discussion/11484/how-do-site-properties-work-under-the-hood/

"Site properties are cached in the applications after the first access. You can notice them listed in the ESpaceInvalidateCache action help page. Also, since version 7.0, changing a value on a site property at runtime automatically triggers an ESpaceInvalidateCache at the end of the request. This is also explained in the Site properties help page."

This is means currently on version 10, changing a value on a site property at runtime: it automatically triggers an ESpaceInvalidateCache at the end of the request, of both producers and consumers regarding the affected site properties. 


All requests done after the change will use the changed value and not the default anymore.


In this specific case when you try to set a new value for it and your action thrown an exception, the change will not be committed and the previous value of the site property will be kept.  The default values are only used if you never set any Effective value to your site property.  


Best Regards

Fabio



Solution

Thanks a lot. Its very useful for me Fabio