Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Options

Chuck Dumont edited this page Aug 21, 2015 · 24 revisions

The Aggregator supports the setting of deployment specific options through the use of a properties file named aggregator.properties in the home directory of the user that launched the server (the default), or in a properties file named using the options servlet init-param. Default options for the application may be specified in aggregator.properties located in the root folder of the bundle defining the servlet.

The following options may be specified in the properties file, or set while the server is running using the setoption console command.

Option name Description
developmentMode Development mode enables the following features:
  • Last-modified dates of source files comprising an aggregated response are checked against the if-modified-since date in the request and against cached responses for every request. (Note: inlined CSS and LESS import updates are not detected this way). When development mode is not enabled, the last-modified dates of source files are not checked. This property may have a value of true or false. The default value is false
  • Dependency verification of module dependency lists (the list of required modules specified in the array parameter of define function calls) against the stored dependencies that were used to build the module dependency graph for require list expansion (unless dependency verification has been disabled by the verifyDeps option). If a module fails dependency verification because its required modules have changed since the dependency graph as last built/validated, then the response being assembled is discarded and a response invoking a JavaScript alert is returned, with the module dependency graph re-validated by an asynchronous task. The alert message informs the user of the module that failed dependency verification and instructs the user to re-load the page.
  • nls directories are scanned for the addition of new, language specific, resources every time a non-language specific resource is requested instead of once per server restart.
  • Enables features that are also enabled by debug mode (see below).
When development mode is enabled, the servlet outputs a banner to the server console on server startup announcing that development mode is enabled, and includes a javascript comment string at the beginning of every aggregator response announcing that development mode is enabled.
debugMode Debug (and development) mode enables the following features:
  • The optimize servlet query arg is recognized only when development or debug mode is enabled.
  • The showFilenames servlet query arg is recognized only when development or debug mode is enabled.
  • The expandRequire=log servlet query arg is recognized only when development or debug mode is enabled.
  • The noCache servlet query arg is recognized only when development or debug mode is enabled.
  • Enhanced error reporting, with information about errors that occur on the server displayed in the browser console using console.error() calls.
sourceMaps If true, then source map support will be enabled. The default value is false. The sourcemaps servlet query arg is recognized only if this option is true.
disableHasFiltering If true, then the aggregator will not perform has.js feature trimming of javascript code. The default value is false.
disableRequireListExpansion If true, then the dependency lists in require() calls will not be expanded to include nested dependencies even if dependency list expansion was specified in the request. The default value is false.
disableHasPluginBranching If true, then has! loader plugin branching will be disabled during require list expansion.
deleteDelay Specifies the delete delay timeout. This is the amount of time, in seconds, to wait before deleting cache files from the file system after a cache file is no longer needed. The purpose of delaying the deletion of cache files is to allow all request threads that may be using the file to complete before the file is removed. The default value is 3 minutes, however, expired cache files may be deleted before the deleteDelay timeout has expired if the server is shut down.
verifyDeps <a name="verifydeps" If true, then the server will verify the declared dependencies of AMD modules against the stored dependencies that were used to build the module dependency graph used in require list expansion, whenever a module is built/compiled and development mode is enabled. The default value is true. Set this option to false to disable verification of declared dependencies when development mode is enabled.
cacheDirectory

Specifies a directory on the server that will be used for the Aggregator cache. If not specified, then the state location for the bundle defining the Aggregator servlet is used.

Note: If you specify a Microsoft Windows based file system path using forward slashes, be sure to escape them (e.g. c:\\temp) or they won't be read properly. Alternatively, you may specify path separators using the back slash on any OS platform.

cacheBust Specifies an arbitrary string that will be combined with the cacheBust property to generate the cache bust string used for server-side dependency map and cache validation as well as specifying the value of the cb query arg in loader generated Aggregator requests. This options is provided to allow system administrator to change the cache bust value for a deployment without the need for modifying the application's loader config. This may be necessary when customizing an app (see Override URIs)
In addition to the options listed above, Aggregator extension may define their own options that they support.

Related console commands

The Aggregator supports the following console commands relating to server options:

aggregator getoptions - Lists the currently defined options and their values.

aggregator setoption <propname> <propvalue> - Persistently sets the specified option to the specified value (aggregator.properties is updated)