This is an old revision of the document!
CMS Prefetch Configuration
The CMS prefetch is a Stages system service. It ensures that Stages displays up to date information of documents that are managed by an external configuration management system (CMS). Therefore the CMS prefetch is scheduled periodically to retrieve the latest revision information for all documents of active projects.
Note: All changes of the configuration described in this document require a restart of the Stages service.
Configuration of the CMS Prefetch
The default configuration of the CMS prefetch is found in
<Stages installation path>/stages/conf/config.xml file:
<stages-config> <properties> <property name="cms.prefetch.activated" value="true"/> <property name="cms.cache.refreshIntervalInMinutes" value="60"/> <property name="cms.prefetch.sleepMillisBetweenDocuments" value="0"/> <property name="cms.prefetch.workersCount" value="1"/> <property name="cms.prefetch.strategy.class" value="de.methodpark.pkit.cms.prefetch.ClassicAllDocumentsStrategy"/> </properties> <cms> ... </cms> </stages-config>
A more detailed description of these properties can be found in the following table:
The following prefetch strategies are currently available.
Classic all documents available
This strategy ignores the maxParallelTasks properties. (cms.prefetch.maxParallelTasks.<CMSType>) It is the default strategy. In case of a single worker thread the documents are prefetched sequentially. In case of multiple worker threads the prefetch of single documents is arbitrarily distributed among all workers.
Prefetch by CMS type strategy
This strategy allows more detailed configuration on the distribution of prefetches dependent on the type of CMS the document is hosted.
cms.prefetch.maxParallelTasks. allows to specify the maximum number of workers that are allowed to process documents of that CMS type. This is useful in case different CMS types are used by one Stages deployment and the CM systems have very different performance characteristics. So it is e.g. possible to specify that there is only one worker for SVN and all other workers should be used for Integrity. This example would need the following configuration:
<stages-config> <properties> <property name="cms.prefetch.workersCount" value="8"/> <property name="cms.prefetch.strategy.class" value="de.methodpark.pkit.cms.prefetch.PrefetchByCMSTypeStrategy"/> <property name="cms.prefetch.maxParallelTasks.SVN" value="1"/> <!--0 is mapped to unlimited, if nothing were configured it would default to 1 --> <property name="cms.prefetch.maxParallelTasks.Integrity" value="0"/> </properties> <cms> ... </cms> </stages-config>
Stages caches two different levels of information regarding files in external configuration management systems. It collects infomation about the folder structure of a CMS and the files contained within these folders. This information is then used for displaying document information such as the version or state of a file.
These caches are - by default - persisted in the file system on the application server that runs Stages. However the administrator may configure these caches to be stored within a relational Database. This increases cache performance significantly.
The configuration of this is done in the Stages configuration file
Each cache requires its own configuration and its own database. An example configuration for both MySQL and Oracle database servers can be found within the file.
Note: After changing the cache persistence settings, the Stages configuration has to be updated (
<Stages installation path>/stages/bin/update.bat) and Stages has to be restarted.