I have a simple controller that loads an image off the disk, re sizes
it and outputs it to the response stream:

[Cache(HttpCacheability.Public, ValidUntilExpires = true, Duration =
60*60, VaryByHeaders = "x-castle-route")]
public void ViewLocal(string path, double? maxWidth, double?
maxHeight)
{
        Context.Request.Headers.Add("x-castle-route",
Context.UrlInfo.UrlRaw);
        byte[] data = File.ReadAllBytes(Context.Server.MapPath(path));
        OutputImage(data, maxHeight, maxWidth); // resizes with the bilinear
algorithm and outputs
}

Unfortunately I can no longer use made up headers in my environment
(rackspace cloud's medium trust rules). I don't use VaryByParams
because I use the routing engine. I think I can get this done with
ETags, but I can't find anything on the net about Castle/MonoRail and
etags. Can someone point me in the right direction? Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to