Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #26644


    I am currently evaluating the product and I ran into a chaching issue.
    I use PD4ML with Coldfusion.

    With CFML I generate the HTML and then feed that to a PD4ML object in

    pd4ml = createObject(“java”,”org.zefer.pd4ml.PD4ML”);

    No while experimenting with a pdf generation tool, I noticed that my CSS links are not refreshed. The content of the seperate CSS file is being cached.
    Only when I add:
    does it refresh.

    Is this correct or is this inefficient?




    Does it mean, the CSS link in your scenario remains the same, but the document, it returns, changes from time to time?


    The link to the css stays the same, but the content of the style sheet was altered.
    It def looked as if the CSS content of the file was being casched in memory.




    PD4ML does not test if a particular resource (image or stylesheet) has been changed: if it has a cached version – it uses it.

    You may explicitly disable caching with pd4ml.cache.enable=false environment variable, or with a dynamic parameter.

    [language=java:2wg7x71d]Map m = new HashMap();
    m.put(PD4Constants.PD4ML_CACHE_ENABLE, false);

    We’ve just refined clearCache() method in the development build, but as I got it worked for you before.

    Another workaround would be to add a harmless dynamically generated parameter to the stylesheet reference:


    It should distinguish a new stylesheet from ones loaded before. As a drawback of the approach it will accumulate stylesheet versions in the cache. It is not that dramatic, as they are cached as soft references, but anyway it is a good idea to perform clearCache() from time to time.

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.