Re: fop-pdf-images and caching

Matt Kynaston <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <CAKBO4j_8TFJBpf3U=V6wU0TWSr+vz+JOebSHqvSNmR2zwh=fUQ@mail.gmail.com>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.