On Jun 6, 2008, at 12:03, Antti Karanta wrote:


On Fri, 06 Jun 2008 12:40:27 +0300, Andreas Delmelle <[EMAIL PROTECTED]> wrote:

The cache can be reached via ImageManager.getCache()

or, more complete, from the FOP-side:

FopFactory.getImageManager().getCache().clearCache();

Thanks! This solved my problem. It is unfortunate that the whole cache is cleared, but in my case that is acceptable whereas using stale images is not.

Another trick that /might/ work, without clearing the cache, is something that is quite commonly used to bypass caching in web- browsers. I haven't tried it with FOP myself, but the principle could be the same.

If the URI in the first document would be:

file:///path/to/someImage.svg?dummy=1

and for the second

file:///path/to/someImage.svg?dummy=2

This could also eliminate use of the cached image (since strictly speaking, the URI is different).

I can't say for sure whether XG Commons stores different entries in those cases, but at first glance, it seems so... The ImageKey seems to be based on the string-representation of the whole URI (including the query part)


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to