The proxy utility called cbuild is an offline cache database manager. This utility enables you to create a new cache structure or modify an existing cache structure using the command-line interface. You can use the Server Manager pages to enable the proxy to use the newly created cache.
The utility does not update the server.xml file. cbuild cannot resize a cache that has multiple partitions. When the cache is created or modified by cbuild, the cachecapacity parameter should be manually updated in the server.xml file.
<PARTITION partitionname="part1" partitiondir="/home/build/install9 /proxy-server1/cache" maxsize="1600" minspace="5" enabled="true"/> <CACHE enabled="true" cachecapacity="2000" cachedir="/tmp/cache">
You can invoke the cbuild utility in two modes. The first mode is:
cbuild -d conf-dir -c cache-dir -s cache size cbuild -d conf-dir -c cache-dir -s cache size -r
For example:
cbuild -d server_root/proxy-serverid/config -c server_root/proxy-serverid/cache -s 512 cbuild -d server_root/proxy-serverid/config -c server_root/proxy-serverid/cache -s 512 -r
where
conf-dir is the configuration directory of the proxy instance located in the server_root/proxy-serverid/config directory.
cache-dir is the directory for your cache structure.
cache size is the maximum size to which the cache can grow. This option cannot be used with the cache-dim parameter. The maximum size is 65135 Mbytes.
-r resizes an existing cache structure provided it has a single partition. This is not required for creating a new cache.
The second mode is:
cbuild -d conf-dir -c cache-dir -n cache-dim cbuild -d conf-dir -c cache-dir -n cache-dim -r
For example:
cbuild -d server_root/proxy-serverid/config -c server_root/proxy-serverid/cache -n 3 cbuild -d server_root/proxy-serverid/config -c server_root/proxy-serverid/cache -n 3 -r
where
conf-dir is the configuration directory of the proxy instance located in the server_root/proxy-serverid/config directory.
cache-dir is the directory for your cache structure.
cache-dim determines the the number of sections. For example, in Figure 12–2 the section shown as s3.4, the 3 indicates the dimension. The default value of cache-dim is 0 and the maximum value is 8.
-r resizes an existing cache structure provided it has a single partition. This option is not required for creating a new cache.
Additionally, cbuild accepts a -R argument which specifies that the .size files of a specified partition must be updated to full accuracy. For example:
cbuild -d conf-dir -c cache-dir -R