Summary
The module mod_as_cache provides support for caching frequently referenced files. It can be used to cache file content, file descriptors or both, or mmap the file.
Directives
Module: mod_as_cache | |
Syntax: CacheLocalFD filename | |
Default: none | |
Context: server config | |
Override: none | |
Origin: iSeries™ | |
Example: CacheLocalFD some_image.gif |
The CacheLocalFD directive is used to specify the names of ASCII/BINARY stream files whose descriptors you want to cache at server startup. The file is opened (share read) and remains open while the server is active. The configuration file can contain multiple directive occurrences. Include a separate directive for each file that you want to remain open. By keeping your most frequently requested files/images opened at server startup, you can improve your server's response time for those files. For example, if you open your server's welcome page files at startup, the server can handle requests for the page much more quickly than if it had to open the files each time they are requested.
The advantage of using CacheLocalFD directive over CacheLocalFile is that it does not cache the content of the file, and therefore does not allocate a large amount of memory, yet provides similar performance. The disadvantage of using CacheLocalFD directive over CacheLocalFile is that it only caches the file descriptors of ASCII/BINARY stream files and it keeps the file open (share read) while the server is active.
The LiveLocalCache directive setting does not apply to this directive and if a cached file is updated, the cached entity is discarded and the updated file is served from the file system. If a cached file is modified while at the same time being served, the content of the response body is unpredictable.
Module: mod_as_cache | |
Syntax: CacheLocalFile filename | |
Default: none | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: CacheLocalFile bobwelcome.html |
The CacheLocalFile directive is used to specify the names of files that you want to load into the server's memory each time that you start the server, and is the recommended file cache method. You can have multiple occurrences of this directive in the configuration file. Include a separate directive for each file that you want to load into memory. By keeping your most frequently requested files loaded in the server's memory, you can improve your server's response time for those files. For example, if you load your server's welcome page into memory at startup, the server can handle requests for the page much more quickly than if it had to read the file from the file system.
Module: mod_as_cache | |
Syntax: CacheLocalFileMmap filename | |
Default: none | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: CacheLocalFileMmap bobwelcome.html |
The CacheLocalFileMmap directive is used to specify the names of files that you want to map to the server's memory each time that you start the server. This directive is similar to the CacheLocalFile directive. Whereas CacheLocalFile allocates storage and copies (read/write) the content of the file to the allocated storage, CacheLocalFileMmap maps the file content to the process storage space without actually allocating storage.
The LiveLocalCache directive setting does not apply to this directive and if a cached file is updated, the cached entity is discarded and the updated file is served from the file system. If a cached file is modified while at the same time being served, the content of the response body is unpredictable.
You can have multiple occurrences of this directive in the configuration file. Include a separate directive for each file that you want to load into memory. By keeping your most frequently requested files mapped in the server's address space, you can improve your server's response time for those files. For example, if you map your server's welcome at startup, the server can handle requests for the page much more quickly than if it had to read the file from the file system.
Module: mod_as_cache | |
Syntax: CacheLocalFilePublic filename | |
Default: none | |
Context: server | |
Override: none | |
Origin: iSeries | |
Example: CacheLocalFilePublic bobwelcome.html |
The CacheLocalFilePublic directive is used to specify the names of files that you want to load into the server's memory each time that you start the server. The files cached here are files that are served without any server authentication. This directive is used by SSL sites which have pages that are publicly available. This simulates the FRCA function completed by the server for non-SSL publicly available files. You can have multiple occurrences of this directive in the configuration file. Include a separate directive for each file that you want to load into memory. By keeping your most frequently requested public files loaded in the server's memory, you can improve your server's response time for those files. For example, if you load your server's welcome page into memory at startup, the server can handle requests for the page much more quickly than if it had to read the file from the file system.
Note: You can use an asterisk (''*'') as a wildcard character on the file names, (for example, CacheLocalFile *.html).
File name matching is not recursive through subdirectories. The server only caches files in the specified directory. No files in subdirectories are affected. There is no authentication or authorization done before any files in this cache are served.
Module: mod_as_cache | |
Syntax: CacheLocalFileSizeLimit size | |
Default: CacheLocalFileSizeLimit 90000 | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: CacheLocalFileSizeLimit 5000000 |
The CacheLocalFileSizeLimit directive is used to specify, in bytes, the largest file that will be placed in the local memory cache. A file larger than the value specified for CacheLocalFileSizeLimit will not be placed in the cache. This prevents the cache from being filled by only a small number of very large files. The upper limit for this directive is capped at 16,000,000. If you specify a larger value the value 16,000,000 will be used.
Module: mod_as_cache | |
Syntax: CacheLocalSizeLimit size | |
Default: CacheLocalSizeLimit 2000 | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: CacheLocalSizeLimit 25000 |
The CacheLocalSizeLimit directive is used to specify the maximum amount of memory, in kilobytes, that you want to allow for file caching. You must specify the files that you want cached with the CacheLocalFile directive or by setting DynamicCache to on. The number you specify is the upper limit (the maximum upper limits 93 gigabytes (100,000,000,000 bytes)); the storage is allocated as a file is cached.
Note: CacheLocalSizeLimit can help limit your cache size when you are using the wildcard character to specify the files on the CacheLocalFile directive.
Module: mod_as_cache | |
Syntax: DynamicCache on | off | |
Default: DynamicCache off | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: DynamicCache on |
The DynamicCache directive is used to specify if you want the server to dynamically cache frequently accessed files. Setting the dynamic cache directive to "on" instructs the server to cache the most frequently accessed files. This results in better performance and system throughput.
Module: mod_as_cache | |
Syntax: FRCACacheLocalFileRunTime filename | |
Default: none | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCACacheLocalFileRunTime /www/html/index.html |
The FRCACacheLocalFileRunTime directive specifies the name of a file that you want to load into the SLIC NFC during server run time if and when it is requested by a client. The configuration file can contain multiple directive occurrences.
During server run time, the below example caches the specified file in FRCA NFC if it is requested by a client.
FRCACacheLocalFileRunTime /www/html/index.html
During server run time, the below example caches in the FRCA NFC any .gif file in the /www/images directory that is requested by a client. For example,
FRCACacheLocalFileRunTime /www/images/*.gif
During server run time, the below example will dynamically cache in the SLIC NFC (based on the file usage) any file that is in a directory path that starts with /www/imag and its subdirectories. For example,
FRCACacheLocalFileRunTime /www/imag*
During server run time, the below example will dynamically cache in the SLIC NFC (based on the file usage) any file in any directory.
FRCACacheLocalFileRunTime /*
For caching files at the server run time, only specify the path name of the files that are intended for public viewing. That is, do not specify or configure file names containing sensitive information which is not intended for general users. FRCACacheLocalFileRunTime only caches files that do not require conversion. (IFS binary or ASCII files).
Module: mod_as_cache | |
Syntax: FRCACacheLocalFileSizeLimit size | |
Default: FRCACacheLocalFileSizeLimit 92160 | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCACacheLocalFileSizeLimit 32000 |
The FRCACacheLocalFileSizeLimit directive specifies the maximum file size (in bytes) that you want to allow for file caching. The directive can control cache storage for a number of smaller files when using wild card characters to specify files in the FRCACacheLocalFileStartUp and FRCACacheLocalFileDynamic directives
The below example allows only caching of files that are equal to or less than 32000 bytes. Files greater than 32000 bytes are not cached.
FRCACacheLocalFileSizeLimit 32000
Module: mod_as_cache | |
Syntax: FRCACacheLocalFileStartUp filename | |
Default: none | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCACacheLocalFileStartUp /www/html/index.html |
The FRCACacheLocalFileStartUp directive specifies the file name that you want to load into the SLIC NFC each time you start the server. The configuration file can contain multiple directive occurrences.
The below example caches a specific file.
FRCACacheLocalFileStartUp /www/html/index.html
The below example caches all .gif files in the /www/images directory.
FRCACacheLocalFileStartUp /www/images/*.gif
FRCACacheLocalFileStartUp only caches files that do not require conversion. (IFS binary or ASCII files). FRCA Proxy does not perform authentication or authorization checking. Therefore, do not specify or configure file names containing sensitive information that is not intended for public viewing.
Module: mod_as_cache | |
Syntax: FRCACacheLocalSizeLimit size | |
Default: FRCACacheLocalSizeLimit 2000 | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCACacheLocalSizeLimit 5000 |
The FRCACacheLocalSizeLimit directive specifies the maximum amount of storage (in kilobytes) that you want to allow for FRCA file caching.
The below example caches files until the accumulated size reaches 5000 kilobytes.
FRCACacheLocalSizeLimit 5000
If the specified directive size is greater than the amount of available storage in the FRCA network file cache, the FRCA network file only caches as many files as it has space for.
Module: mod_as_cache | |
Syntax: FRCACookieAware <path> | |
Default: none | |
Context: | |
Override: none | |
Origin: | |
Example: FRCACookieAware /some_path_segment |
This FRCACookieAware directive indicates URL prefix for which the cookie should be included in cache lookup. This directive makes it possible to serve a cached entity only for the requests with the same cookie
Module: mod_as_cache | |
Syntax: FRCAEnableFileCache on | off | |
Default: FRCAEnableFileCache off | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCAEnableFileCache on |
The FRCAEnableFileCache directive enables or disables FRCA file caching support for the specified server.
Module: mod_as_cache | |
Syntax: FRCAEnableProxy on | off | |
Default: FRCAEnableProxy off | |
Context: server config, virtual host | |
Override: none | |
Origin: iSeries | |
Example: FRCAEnableProxy on |
The FRCAEnableFileCache directive enables or disables FRCA proxy support.
FRCA proxy does not perform authentication or authorization checking for the HTTP requests that are served by the FRCA Proxy support.
Module: mod_as_cache | |
Syntax: FRCAEndofURLMarker <string> | |
Default: none | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCAEndofURLMarker ###" | |
Example: FRCAEndofURLMarker eou | |
Example: FRCAEndofURLMarker #eou# |
The FRCAEndofURLMarker directive specifies the unique string that identifies the end of URLs. Suppose a link in an html page is http://some.org/some_path/some_parms###. Before the client sends this request to the server, it may pad the URL with data such as client_padded_data. The some.org server will receive the path /some_path/some_parms###client_padded_data.
By specifying FRCAEndofURLMarker ###", FRCA support can identify the end of the original URL (link) before it was modified or padded by the client.
Module: mod_as_cache | |
Syntax: FRCAMaxCommBufferSize size | |
Default: FRCAMaxCommBufferSize 8000 | |
Context: server config | |
Override: none | |
Origin: Apache | |
Example: FRCAMaxCommBufferSize 4000000 |
The FRCAMaxCommBufferSize directive sets the communication buffer size (in bytes) in FRCA for performance. The data being sent to HTTP Server (powered by Apache) consists of log data, message data, and collection services data. FRCA will buffer the size of data specified until the buffer is full. Once the buffer is full, the data will be transmitted to Apache for processing.
Module: mod_as_cache | |
Syntax: FRCAMaxCommTime time | |
Default: FRCAMaxCommTime 120 | |
Context: server config | |
Override: none | |
Origin: Apache | |
Example: FRCAMaxCommTime 240 |
The FRCAMaxCommTime directive sets the maximum number of seconds to wait before the data buffer is sent from FRCA to HTTP Server (powered by Apache). The data being sent to HTTP Server consists of log data, message data, and collection services data. Once the time limit has been reached, the data will be transmitted to HTTP Server for processing. Valid values include integers 0 through 65,535.
Module: mod_as_cache | |
Syntax: FRCAProxyCacheEntitySizeLimit size | |
Default: FRCAProxyCacheEntitySizeLimit 92160 | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCAProxyCacheEntitySizeLimit 8000 |
The FRCAProxyCacheEntitySizeLimit directive specifies the maximum proxy response entity size (in bytes) for FRCA to cache.
The below example only allows caching of proxy responses that are equal to, or less than, 8000 bytes.
FRCAProxyCacheEntitySizeLimit 8000
Module: mod_as_cache | |
Syntax: FRCAProxyCacheExpiryLimit <time> | |
Default: FRCAProxyCacheExpiryLimit 86400 | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCAProxyCacheExpiryLimit 3600 |
The FRCAProxyCacheExpiryLimit directive sets the expiration (in seconds) for FRCA proxy cached HTTP documents. Expiry time for FRCA proxy cached HTTP documents will be set to at most nnn number of seconds into the future. FRCA proxy cached HTTP documents can be at most nnn seconds out of date. If the expire header is present with the document in the response, then the lower of the two values is used.
FRCA proxy cached HTTP documents are limited by the specified time interval (in seconds). This restriction is enforced even if an expiration date is supplied with the HTTP document.
Module: mod_as_cache | |
Syntax: FRCAProxyCacheRefreshInterval <proxy> <time> | |
Default: none | |
Context: server config, virtual host | |
Override: none | |
Origin: iSeries | |
Example: FRCAProxyCacheRefreshInterval /mirror/ibm/test 30 |
The FRCAProxyCacehRefreshInterval directive sets the time period (in seconds) to use each cached entity, for the specified URI, before refreshing the cache.
FRCA proxy cached HTTP documents are limited by the specified interval (in seconds). This restriction is enforced even if an expiration date is supplied with the HTTP document.
Module: mod_as_cache | |
Syntax: FRCAProxyCacheSizeLimit size | |
Default: FRCAProxyCacheSizeLimit 2000 | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCAProxyCacheSizeLimit 5000 |
The FRCAProxyCacheSizeLimit directive specifies the maximum amount of storage (in kilobytes) that FRCA proxy caching uses for the specified server.
The below example caches proxy response entities until the accumulated size reaches 5000 kilobytes.
FRCAProxyCacheSizeLimit 5000
Module: mod_as_cache | |
Syntax: FRCAProxyPass <path> <URL> | |
Default: none | |
Context: server config, virtual host | |
Override: none | |
Origin: iSeries | |
Example: FRCAProxyPass /mirror/foo/ http://foo.com/ |
The FRCAProxyPass directive allows remote servers to map into the local server space. The local server does not act as a proxy in the conventional sense; it acts a mirror of the remote server.
If the local server address is http://ibm.com/ then FRCAProxyPass /mirror/ibm1/ http://ibm1.com/ causes a local request for the http://ibm.com/mirror/ibm1/location to be internally converted into a proxy request of http://ibm1.com/location.
Module: mod_as_cache | |
Syntax: FRCARandomizeResponse <path> <string> <nnn> <mmm> | |
Default: none | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: FRCARandomizeResponse /some_path/fileNNN.html NNN 1 1000 | |
Example: FRCARandomizeResponse /some_path/fileXXX.html XXX 200 300 |
The FRCARandomizeResponse directive specifies the path template, the replacement string marker, and the random number range that you would like FRCA to randomly use when selecting and serving files of that template. For example, if you have 1000 files with names file1.html through file1000.html. By configuring FRCARandomizeResponse /document_root_alias_path/fileNNN.html NNN 1 1000 and requesting the URL http://some_host:port/dirpath/fileNNN.html, FRCA will randomly select and serve one of the 1000 files.
Module: mod_as_cache | |
Syntax: LiveLocalCache on | off | |
Default: LiveLocalCache on | |
Context: server config | |
Override: none | |
Origin: iSeries | |
Example: LiveLocalCache off |
The LiveLocalCache directive is used to specify if the cache is updated when a cached file is modified. Set this directive to "on" if you want users, requesting a cached file, to receive the file with the latest updates. Setting this directive to "off" is the optimum setting for performance. When LiveLocalCache directive is set to "on", before responding to a request for a file that is stored in memory, the server checks to see if the file has changed since the server was started. If the file has changed, the server responds to this request with the updated file. The server then deletes the older file version from memory. Restart the server to load the new file into memory.