gestalt-config / gestalt

A Java configuration library
https://gestalt-config.github.io/gestalt/
Apache License 2.0
84 stars 2 forks source link

Differentiate between immediate evaluation at load time and deferred evaluation when getting the configuration. #226

Closed credmond-git closed 2 weeks ago

credmond-git commented 4 weeks ago

We need to differentiate between immediate evaluation at load time and deferred evaluation when getting the configuration.

https://jakarta.ee/specifications/expression-language/6.0/jakarta-expression-language-spec-6.0#eval-expressions

the ${expr} construct for immediate evaluation and the #{expr} construct for deferred evaluation. This difference in delimiters points out the semantic differences between the two expression types in the Jakarta EE web tier. Expressions delimited by #{} are said to use “deferred evaluation” because the expression is not evaluated until its value is needed by the system. Expressions delimited by ${} are said to use “immediate evaluation” because the expression is compiled when the JSP page is compiled and it is executed when the JSP page is executed. More on this in Section 1.2.4, “Syntax restrictions”.

We will need to use the noCache metadata so we do not cache results and get a new value each time.