D
Dmitry Duginov
Hi,
I have image.aspx that can accept 3 query string parameters (FolderID,
ImageID, Size) and it returns full jpg image or image thumbnail (depending
on size).
I included the following directive:
<%@ OutputCache Duration="3600" VaryByParam="FolderID;ImageID;Size" %>
to cache images/thumbnails for an hour
The images ate taken programmaticaly from file system and returned this way:
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream,System.Drawing.Imaging.ImageFormat.Jpeg);
// for thumbnails
//or
//Response.WriteFile(imagepath); // for full images
Response.End;
But I noticed that caching doesn't work. After first request for specific
picture all subsequent calls execute the code over and over again instead
taking the first result from cache. What I am missing and how to fix it?
Regards,
Dmitry
I have image.aspx that can accept 3 query string parameters (FolderID,
ImageID, Size) and it returns full jpg image or image thumbnail (depending
on size).
I included the following directive:
<%@ OutputCache Duration="3600" VaryByParam="FolderID;ImageID;Size" %>
to cache images/thumbnails for an hour
The images ate taken programmaticaly from file system and returned this way:
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream,System.Drawing.Imaging.ImageFormat.Jpeg);
// for thumbnails
//or
//Response.WriteFile(imagepath); // for full images
Response.End;
But I noticed that caching doesn't work. After first request for specific
picture all subsequent calls execute the code over and over again instead
taking the first result from cache. What I am missing and how to fix it?
Regards,
Dmitry