docs: protected Map<String, Object> getConstants(FacesContext facesContext, Class<?> type) {
          boolean cacheEnabled = facesContext.isProjectStage(ProjectStage.Production);
          Map<Class<?>, Map<String, Object>> cache
                  = PrimeApplicationContext.getCurrentInstance(FacesContext.getCurrentInstance()).getConstantsCacheMap();
  
          Map<String, Object> constants;
  
          if (cacheEnabled && cache.containsKey(type)) {
              constants = cache.get(type);
          }
          else {
              constants = Collections.unmodifiableMap(collectConstants(type));
  
              if (cacheEnabled) {
                  cache.put(type, constants);
              }
          }
  
          return constants;
      }