stream document being cached

Hi,

I am having problem of the document stream being cached even though I am providing these properties for the stream source.Are there any other parameters I need to set?

resource.getStream().setParameter(“Cache-Control”,“private,no-cache,no-store”);
resource.getStream().setCacheTime(0);
resource.setMIMEType(“application/pdf”);

Quick response is much appreciated.

Thanks,

I don’t quite know why the cache settings do not work or if there are ones that do, but this is a known problem. A workaround is to change the filename each time the document is reloaded. See the makeImageFilename() method and how it is used in
this example
.