Back Forward Static content

Static content refers to information that can be extracted once from a rule to a HTTP server or Web server and thereafter is unaffected by use of an application, the contents of user clipboards, and so on. R-18817 personal RuleSet extractVERY LONG TOPIC -- CONVERT TO CONCEPT?

Process Commander stores static contents for these rule types:

Each directory below the StaticContent directory contains extracted static content; the directory name encodes the exact RuleSet list that the content belongs to. To minimize storage, Process Commander creates directory names with on a hash code derived from an entire RuleSet list.

As a result the file system may contain many different files named CompanyLogo.jpg. Which CompanyLogo.jpg file that a user receives for display in a browser session depends on that user's RuleSet list.

Static content bundling

Through static content bundle rules (Rule-File-Bundle) and the static JSP tag, Process Commander can serve multiple JavaScript or CSS files, defined by text files rules, in a single HTTP response. Such bundling can improve response times by delivering all files needed by a form to the workstation browser at once, rather than through a one-by-one sequence of HTTP requests. Proj-332 5.4

Using a bundle rule is usually preferred over one large text file containing all the JavaScript or CSS code, though both approaches consolidate the related parts into one HTTP response. When you use the bundle rule, the component text file rules that are bundled remain distinct and shorter, simplifying maintenance and allowing rule resolution to operate.

Static Content purging PROJ-872 5.4

The StaticContent directory can grow to contain thousands of subdirectories and files, especially in a development system where each developer has distinct RuleSet lists and Rule-File- rules are changing.

Periodically, the Pega-RULES agent runs an activity that purges static content directories, deleting files and subdirectories that are older than a specified period. By default, this activity runs once each hour and deletes files and subdirectories more than 72 hours old. You can change this retention period through a prconfig.xml setting.

Deleting old files and subdirectories saves disk space and also simplifies the directory structure, improving runtime access. If a user at runtime later needs a file that was purged, a new copy is rapidly re-extracted from the database, on demand.

Notes

The RuleFileServlet servlet locates and "serves" the correct version of a static content file to a user. If the static, extracted file has never previously been referenced, this servlet extracts it first from the rule.

Through settings in the prconfig.xml file, Process Commander supports HTTP compression of static files, to reduce HTTP message size and network demand. The HTTP/ServerGZIPenabled setting (for UNIX servers) is enabled by default, meaning that compression occurs. If needed for debugging or other purposes, you can set the value of these settings to false to disable such compression. SR-1432

<env name="http/ServerGZIPenabled" value="false" />

(A similar setting http/ServerZIPEnabled setting for Windows servers is not enabled by default; add it with value="true" if desired.)

Use the System Management application to delete all static content extracted on the current node.

To clear the Internet Explorer cache on a workstation, select the Tools > Internet Options > General > Temporary Internet Files menu item, click  Delete Files   and click  OK  . (Other browsers offer a similar menu option.)

By default, the HTTP messages sent from Process Commander to a browser session have a cache-control setting of 24 hours (86,400 seconds). The http/defaultcachingtimeout element in the prconfig.xml file controls this HTTP setting.

<env name="http/defaultcachingtimeout" value="3600" />

The location of the StaticContent directory is determined by the temporary files path setting in the prconfig.xml file.

In a production system, user response may be improved by deploying copies of static content in distributed "edge" servers.

Definitions RuleSet list, servlet, stream processing, temporary files
Related topics About Binary File rules
About Static Content Bundle rules
About Text File rules
About the System Management application
How to deploy static content to an edge server
static JSP tag
Understanding the Pega-RULES agent

UpDefinitions — S