Steve,
Since our Cassini does not let set caching policies at the folder level, we could recommend considering a couple of workarounds involving writing code:
- One is to either handle one of the Global.asax events, like Application_EndRequest to add
cacheability control to no-cache in the response, or to use HttpModule plugged into the request pipeline through the web.config to set cacheabiliy properties there. Please note that if you run your application under both Cassini and IIS, HttpModule under Cassini will get its turn at every request, including ones for static files, like CSS, graphics and script files, while IIS in its default configuration only sends ASPX, ASMX ASHX other other .NET-specific requests to the HttpModule, and if your images are in JPEG format, then under IIS you HttpModule won't get its turn at handling requests for the files.
- Another way is to consider whether to generate your images on the fly and send them directly to the browser, instead of saving them to disk. This is not Cassini-specific trick - just ASP.NET. If your images are not reusable, and are made to be served just once after being generated, consider creating an HttpHandler - another .NET feature that lets you generate response of any MIME type, including image/jpeg. There cache control would be very easy.
Best regards,
UltiDev Team.
Please donate at
http://www.ultidev.com/products/Donate.aspx to help us improve our products.