Data Caching in Tests

Silk Central uses caching in Tests to improve the scalability of the front-end server and to reduce database load when multiple users work on the same project simultaneously. The Tests tree and test filters have significant impact on the front-end and database servers. Because information from the Tests tree and filters for specific projects can be shared among users, these areas are well suited to caching.

Tests Tree Caching

The Tests tree cache retains all tree information for projects that are currently in use in memory and regularly checks the database for changes to the tree. Administrators can influence the behavior of the cache by setting Cache/TestPlanTree/CheckForChangesInterval in the TMFrontendBootConf.xml configuration file. This is the maximum interval in seconds that tree information may remain outdated. Regardless of this setting, if a change occurs to a test, folder, or container on the same front-end server, the cache will be immediately updated with the change. The Cache/TestPlanTree/CheckForChangesInterval setting is only relevant when a change occurs on a different front-end server. When a project is not used by a user for more than an hour, the entire project tree cache is cleared and the project is reloaded the next time a user accesses it.

Test Filter Caching

With filter caching, the IDs of tests that match the criteria of specific filters are cached for a specified period of time, based on the minimum cache time setting and the execution time of each filter. Administrators can influence this behavior by setting two properties at Cache/FilterCache/ in the TMFrontendBootConf.xml configuration file.

The first property, MinimalLifeTime, defines the minimum time in seconds before a filter result can be removed from the cache. The second property, LifeTimeMultiplier, makes this minimum setting dependent on the time it takes to execute the filter query. For example, if you define a multiplier of > 0, the maximum time that a result can remain in the cache is MinimalLifeTime, or the query execution time, multiplied by the LifeTimeMultiplier. So, if you have a filter query that takes 1 second to execute, and you use the default values, both 30, for MinimalLifeTime and LifeTimeMultiplier, then the filter result will be cached for 30 seconds. If the filter query takes half a second to execute, then the filter result will still be cached for 30 seconds. If however the filter query takes 2 seconds to execute, then the filter result will be cached for 60 seconds.

Recommendation Engine Caching

When you add keywords to a keyword-driven test or a keyword sequence in the Keyword-Driven Test Editor, Silk Central recommends existing keywords which you might want to use as the next keyword in your test. The recommended keywords are listed on top of the keywords list, and are indicated by a bar graph, with the filled-out portion of the graph corresponding to how much Silk Central recommends the keyword.

Administrators can influence the interval at which the recommendation cache is refreshed by setting the RecommendationCache/ExpireAfterWrite property in the TMFrontendBootConf.xml configuration file.

JMX Measures for Caching

Silk Central offers JMX read measures to monitor underlying Java processes and other process-specific measures. JMX information for the Tests tree cache and the test filter cache can be found in the JMX measures tree at borland.com/Frontend/TM.

Note: Silk Performance Explorer and other tools can be used to track these and other measures.