As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.

Analytics Report Cache Configuration

ThreadFix introduced caching to the Analytics and Dashboard pages to improve their performance. The configuration for caching is handled in two separate XML configuration files, applicationContext.xml and ehcache.xml...


The applicationContext.xml file (path: <threadfix-deploy>/WEB-INF/applicationContext.xml) can be modified to completely disable caching by removing or commenting out the following lines:

<!-- Cache configuration -->
<cache:annotation-driven cache-manager="ehCacheManager"/>

<bean id="ehCacheManager" class="org.springframework.cache.jcache.JCacheCacheManager">
	<property name="cacheManager">
		<bean class="org.springframework.cache.jcache.JCacheManagerFactoryBean" p:cacheManagerUri="classpath:ehcache.xml" />
	</property>
</bean>


Additionally, the ehcache.xml file (path: <threadfix-deploy>/WEB-INF/classes/ehcache.xml) can be configured according to the EhCache documentation located here: http://www.ehcache.org/documentation/3.0/xml.html.


For example, to change the time-to-live (TTL) value (the amount of time results are stored in the cache) from 1 hour to 10 minutes, you would update the following line in ehcache.xml...

From:
<ttl unit="hours">1</ttl>


To:
<ttl unit="minutes">10</ttl>


Note: If you want to keep caching enabled but need to reset the cached report data on an on-demand basis (before the scheduled TTL expiration), you can restart Tomcat.

www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.

This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.