Hi,
I have an .aspx page that dynamically generates an image, by calling
Response.ContentType = "image/jpeg";
and Response.BinaryWrite( ImageData );
I am trying to use the @OutputCache directive to limit the number of times
the image is generated, but it isn't working for me. I am using the
following directive:
<%@ OutputCache Duration="300" VaryByParam="*" Location="Server" %>
But each time I hit refresh in the browser, the image is regenerated. Note
the OutputCache *does* work for me on a standard test page that spews out
HTML rather than image data.
Has anyone got OutputCache to work with generated images? Can anyone see any
potential pitfalls? I am using codebehind files - is this likely to make any
difference?
Thanks in advance,
David
aazz aazz - 05 Oct 2003 02:34 GMT
I had the same problem. I noticed that a call to Response.End() could
prevent the page from caching.