> Athalye, Rishi wrote: > > > > We are using fop 0.20.3 and it appears to be working fine for our > > purpose except for 1 major point. Caching of Images. > > Yep, I was going to have a look at improving this, but haven't had the > time lately. > > > I did read about some people coming up with a solution for "Image > > Caching" and also that it's a known issue. > > There isn't a fix for it AFAIK, but you can turn off caching altogether > with a recompile. Comment out line 196 in FopImageFactory on the > maintenance branch like so: > > // m_urlMap.put(href, imageInstance); > > and recompile FOP. > > Note that this will slow down rendering and increase short-term memory > usage if you use the same image multiple times in a document. It will > get worse the more you use the same image. > > Unless someone comes up with an actual fix (or applies an existing fix > if there is one out there in the wild) sometime real soon now, then this > will still be a problem in the next release. > > Mike.
I ran into the same problem; I solved it in the current code by adding a static method that clears the cache. I call this method before I run fop. Unfortunately, the caching code in the stable assumes that you are only calling fop once (e.g. from the command line) or, at least, that external files aren't changing. This is also a big memory leak - if you have a lot of large (in my experience, 1024x map pngs) snapshots, and use different urls for each run, then each is loaded into heap and the whole thing gets enormous. -- Paul Reavis [EMAIL PROTECTED] Design Lead Partner Software, Inc. http://www.partnersoft.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]