1

The caption says it all. By default, JSF performs periodic checks of Facelets views changes And the check can be configured through context parameter

javax.faces.FACELETS_REFRESH_PERIOD 

Further, there is this method in abstract class FaceletCache

public abstract boolean isFaceletCached(URL url);

which can be overridden to cache Facelet or not.

I was looking at the default implementation of FaceletCache but couldn't get to know whether Facelets are cached by default or not.

/**
 * Default FaceletCache implementation.
 */

final class DefaultFaceletCache extends FaceletCache<DefaultFacelet> {
    @Override
    public boolean isFaceletCached(URL url) {
        com.sun.faces.util.Util.notNull("url", url);

        return _faceletCache.containsKey(url);
    }


     //.....
}

And when should one really cache Facelet?

Farhan stands with Palestine
  • 13,890
  • 13
  • 58
  • 105

0 Answers0