Enabling Cache-Control for the Actuate Viewer and Deployment Kit

rmurphy
edited July 28, 2021 in Analytics #1
<p><span style=""font-size: small;"">Enabling Cache-Control in the Actuate Viewer and Deployment Kit</span></p>
<p>In the Actuate BIRT Viewer and Deployment Kit there is a servlet filter that can be leveraged to allow the browser to cache certain files.  This servlet filter adds sets the Cache-Control header for URL patterns specified by the filter mappings.  The goal of caching in this instance is to eliminate the need to send requests to the server for common files such as images, flash content, etc.</p>
<p>To use this servlet filter, add the following to the the viewers web.xml</p>
<p>< !-- Filter used to add cache header to the mapped urls. cache valid for 1 day only-- ><br />< filter ><br />   < filter-name >Cache< /filter-name ><br />   < filter-class >com.actuate.iv.HeaderFilter< /filter-class ><br />   < init-param ><br />      < param-name >cache< /param-name ><br />      < param-value >public, max-age=86400< /param-value ><br />   < /init-param ><br />< /filter ><br />< filter-mapping ><br />   < filter-name >Cache< /filter-name ><br />   < url-pattern >*.gif< /url-pattern ><br />< /filter-mapping ><br />< filter-mapping ><br />   < filter-name >Cache< /filter-name ><br />   < url-pattern >*.png< /url-pattern ><br />< /filter-mapping ><br />< filter-mapping ><br />   < filter-name >Cache< /filter-name ><br />   < url-pattern >*.js< /url-pattern ><br />< /filter-mapping ><br />< filter-mapping ><br />   < filter-name >Cache< /filter-name ><br />   < url-pattern >*.css< /url-pattern ><br />< /filter-mapping ><br />< filter-mapping ><br />   < filter-name >Cache< /filter-name ><br />   < url-pattern >/jsapi< /url-pattern ><br />< /filter-mapping ></p>
<!-- Filter used to add cache header to the mapped urls. cache valid for 1 day only--><!-- Filter used to add cache header to the mapped urls. cache valid for 1 day only--><!-- Filter used to add cache header to the mapped urls. cache valid for 1 day only-->