DevPortal

How do I vary Cache Size?


Pramati Server provides caching of dynamic content which can be enabled or disabled by editing the <cache-enabled> attribute in the following tag in web-config.xml: <caching cache-enabled="true" cache-rule-file-name="web-cache.xml"/>

The parameters for caching are specified in a separate file as specified in the cache-rule-file-name attribute. The cache size indicates the memory space that is allocated to cache static content: <max-cache-size-mb>5</max-cache-size-mb>

The cache size is based on the number of virtual hosts. File I/O operations are generally expensive and are used while serving static content. To avoid loading the same static files, they are cached when served for the first time. When another request for the same file is made while delivering a content from cache, it increases Server performance significantly. A higher cache improves Server throughput when a proper value is set. Setting a very high value reduces the memory available to the VM and degrades performance.

Note: For a file to be cached, the file size should be less than 1/10 of the actual cache size. For a Cache Server, where the client does not make direct requests to the server, it is advised to keep the cache-size low. Server should be provided with maximum possible cache size based on the size of the static content of the application and available RAM.


© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal