HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Deployment / Configuration issues › Disable the CSS and Images cache. › Re: Re: Disable the CSS and Images cache.
There is a couple of approaches to disable caching.
1. Set an environment variable (add the following to JVM command line):
-Dpd4ml.cache.enable=false
( the same from Java/JSP code if JVM security policy allows: System.setProperty(“pd4ml.cache.enable”,”false”) )
or via PD4ML API call:
[language=java:1kphbjqm]HashMap map = new HashMap();
map.put(“pd4ml.cache.enable”,”false”) ;
pd4ml.setDynamicParams(map);[/language:1kphbjqm]
2. Another method is to add a random suffix to CSS URL:
(JSP sample)
[language=xml:1kphbjqm]<%
String suffix = “”;
if ( debug ) {
suffix = “?dummy=” + generateRandom();
}
%>
<link rel="stylesheet" type="text/css" href="xstyle.css” />[/language:1kphbjqm]