wro4j-core/src/main/java/ro/isdc/wro/http/support/ResponseHeadersConfigurer.java
public static ResponseHeadersConfigurer fromConfig(final WroConfiguration config) {
    return new ResponseHeadersConfigurer(config.getHeader()) {
      @Override
      public void configureDefaultHeaders(final Map<String, String> map) {
        if (config.isDebug()) {
          // prevent caching when in development mode
          addNoCacheHeaders(map);
        } else {
          final Calendar cal = Calendar.getInstance();
          cal.roll(Calendar.YEAR, 1);
          map.put(HttpHeader.CACHE_CONTROL.toString(), DEFAULT_CACHE_CONTROL_VALUE);
          map.put(HttpHeader.EXPIRES.toString(), WroUtil.toDateAsString(cal.getTimeInMillis()));
          // TODO probably this is not a good idea to set this field which will have a different value when there will be
          // more than one instance of wro4j.
          map.put(HttpHeader.LAST_MODIFIED.toString(), WroUtil.toDateAsString(getLastModifiedTimestamp()));
        }
      };
    };
  }
public static ResponseHeadersConfigurer fromConfig(final WroConfiguration config) {
    return new ResponseHeadersConfigurer(config.getHeader()) {
      @Override
      public void configureDefaultHeaders(final Map<String, String> map) {
        if (config.isDebug()) {
          // prevent caching when in development mode
          addNoCacheHeaders(map);
        } else {
          final Calendar cal = Calendar.getInstance();
          cal.roll(Calendar.YEAR, 1);
          map.put(HttpHeader.CACHE_CONTROL.toString(), DEFAULT_CACHE_CONTROL_VALUE);
          map.put(HttpHeader.EXPIRES.toString(), WroUtil.toDateAsString(cal.getTimeInMillis()));
          // TODO probably this is not a good idea to set this field which will have a different value when there will be
          // more than one instance of wro4j.
          map.put(HttpHeader.LAST_MODIFIED.toString(), WroUtil.toDateAsString(getLastModifiedTimestamp()));
        }
      };
    };
  }
Factory method which creates a {@link ResponseHeadersConfigurer} containing headers used to disable cache in debug
mode.