JSF has the
ability to cache Facelets. In order to update the cache, JSF performs periodic
checks of Facelets views changes. In the development stage, you may need to
perform this check much often than in production. For this, you can set the javax.faces.FACELETS_REFRESH_PERIOD context parameter as shown in the following
example (the value represents the number of seconds between two consecutive
checks).
5 SECONDS TIMEOUT
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>5</param-value>
</context-param>
There are two special values:
·
-1 means no
refresh (cache indefinitely)
·
0 means no
caching at all (always hot reload)
Starting with JSF 2.3, when the
project stage is Production (default) the Facelets refresh period is -1 (no
refresh).
Niciun comentariu :
Trimiteți un comentariu