mod_plsql configuration file cache.conf
cache.conf file contains the cache settings for mod_plsql. This file contains parameters which specify the characteristics of the mod_plsql cache system.
This file is relevant only if the PL/SQL Application uses the OWA_CACHE
packages to cache content in the file system.
Extremely few customer applications make use of the OWA_CACHE
packages.
The following parameters can be specified in cache.conf:
PlsqlCacheCleanupTime
Specifies the time to start the cleanup of the cache storage.
This setting defines the exact day and time in which mod_plsql cache cleanup should occur.
The frequency can be set as daily
, weekly
, and monthly
.
- To define daily frequency, the keyword "Everyday" is used. The cleanup starts everyday at the time defined. For example, Everyday 2:00. This causes the cleanup to happen everyday at 2 AM (local time) in the morning.
- To define weekly frequency, the days of the week such as "Sunday", "Monday", "Tuesday", and so on are used. For example, Wednesday 15:30. This causes the cleanup to happen every Wednesday at 3:30 PM (local time) in the afternoon.
- To define monthly frequency, the keyword "Everymonth" is used. The cleanup starts at the Saturday of the month at the time defined. For example, Everymonth 23:00. This causes the cleanup to happen the first Saturday of every month at 11:00 PM (local time) at night.
- Syntax:
- PlsqlCacheCleanupTime [Sunday-Saturday] [hh:mm]
- PlsqlCacheCleanupTime [Everyday] [hh:mm]
- PlsqlCacheCleanupTime [Everymonth] [hh:mm]
- Default:
- Saturday 23:00
- Example:
- PlsqlCacheCleanupTime Saturday 23:00
PlsqlCacheDirectory
Specifies the directory where cache files are written out by mod_plsql. This directory must exist or else Oracle HTTP Server will not start.
On UNIX, this directory must have write permissions by the owner of the child httpd processes.
- Syntax:
- PlsqlCacheDirectory [directory]
- Default:
- %ORACLE_HOME%/Apache/modplsql/cache
- Example:
- PlsqlCacheDirectory %ORACLE_HOME%/Apache/modplsql/cache
PlsqlCacheEnable
Enables mod_plsql caching.
- Syntax:
- PlsqlCacheEnable On
- PlsqlCacheEnable Off
- Default:
- Off
- Example:
- PlsqlCacheEnable On
PlsqlCacheMaxAge
Specifies the maximum time, in days, a cache file can be allowed to reside in a file system cache, after which the cached file will be removed for cache maintenance.
This setting is to ensure that the cache system does not contain old content. This setting removes old cache files and makes space for new ones.
- Syntax:
- PlsqlCacheMaxAge [number]
- Default:
- 30 (30 days)
- Example:
- PlsqlCacheMaxAge 15
PlsqlCacheMaxSize
Specifies the total size of the cache directory.
This setting limits the amount of space the cache is allowed to use. Both PLSQL cache and Session Cookie cache share this cache space. Note that this setting is not a hard limit. It might exceed the limit temporarily during normal processing. This is normal behavior.
The cleanup algorithm uses this setting to determine how much to reduce the cache files. Therefore, the real space limit is the physical storage's available size.
This parameter takes bytes as values:
- 1 megabytes = 1048576 bytes
- 10 megabytes = 10485760 bytes
- Syntax:
- PlsqlCacheTotalSize [number]
- Default:
- 20971520 (20 MB)
- Example:
- PlsqlCacheTotalSize 20971520
PlsqlCacheTotalSize
Specifies the maximum possible size of a cache file.
This setting is to prevent the case in which one file can fill up the entire cache. In general, it is recommended that this be set to about 1-3 percent of the total cache size.
- Syntax:
- PlsqlCacheMaxSize [number]
- Default:
- 1048576 (1 MB)
- Example:
- PlsqlCacheMaxSize 2097152
Sample mod_plsql cache.conf configuration file:
# Note: This file should be included into your plsql.conf with the "include" directive.
PlsqlCacheEnable Off
PlsqlCacheDirectory %ORACLE_HOME%/Apache/modplsql/cache
PlsqlCacheTotalSize 20971520
PlsqlCacheMaxSize 1048576
PlsqlCacheMaxAge 30
PlsqlCacheCleanupTime Everyday 23:00