You can cache the static contents file stored on the disk in the memory, return the file from the cache to the browser, and can reduce the response time of static contents.
You can use this functionality only in Windows version.
Embed the mod_hws_cache module to use the static contents cache functionality. Specify the configuration file (httpsd.conf) as follows to embed the mod_hws_cache module:
LoadModule hws_cache_module modules/mod_hws_cache.so |
Specify the handler name hws_cache to use the cache functionality in the AddHandler directive or the SetHandler directive.
Set the AddHandler directive to cache the file with a specific extension. The setting method is as follows:
<Directory "<Cosminexus-installation-directory>/httpsd/htdocs"> |
Set the SetHandler directive to cache the file under a specific URL. The setting method is as follows:
<Directory "<Cosminexus-installation-directory>/httpsd/icons"> |
The trigger to cache a file is shown below. However, if the file size is larger than the size set in the HWSContentCacheMaxFileSize directive, the file is not cached.
The trigger in which cache is updated is shown below. However, if the file size is bigger than the size set in the HWSContentCacheMaxFileSize directive, the file is not cached.
The trigger in which cache is deleted is shown below:
You can calculate the maximum memory size used in the static contents cache functionality with the following formula:
(HWSContentCacheMaxFileSize ThreadsPerChild) + HWSContentCacheSize
Do not cache the files placed in the URL in which the reverse proxy, CGI, and other dynamic content processes are performed. If you specify files as files to be cached by mistake, dynamic content might not be processed correctly.
The following is a usage example:
ScriptAlias /cgi-bin/ "<Cosminexus-installation-directory>/httpsd/cgi-bin/" |