xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Kynaston <m...@claritum.com>
Subject Re: fop-pdf-images and caching
Date Thu, 16 Nov 2017 13:31:59 GMT
> First, I get a hit on the external PDF for each and every page. I've had a
> look at the PreloadPDF and it looks like it's meant to be caching, but
> apparently not. Is there some configuration I'm missing for this?
>

Ah hah. Turns out I was looking at the trunk version of fop-pdf-images when
I saw the caching stuff. That was removed before version 2.2 was tagged.

Going back to ticket FOP-2135 it looks like this "document level" cache was
added to reduce the document size, not avoid repeated hits on remote
resources. Caching the remote resource is handled
by org.apache.xmlgraphics.image.loader.cache.ImageCache, which in turn
checks isCachable() on the image. ImagePDF returns false for that :(

Does anyone have any insights into this? Is there any way to make a PDF
image cacheable?

Second, if I rename the external PDF I get an error as expected. However
> renaming it back doesn't seem to be picked up immediately: it takes one or
> more runs before it's found again.
>

Again, this is down to ImageCache, which is keeping track of invalid URLs
for 60s.

Matt

Mime
View raw message