ASP.NET has an interface to cache the content it generates. It looks like
this in the page:
<%@ OutputCache Duration="#ofseconds">
One of the elements you can specify is the length in time the item should be
cached.
http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconOutputCache.asp
So, if you dynamically generate these web artifacts (css, jpg, htm, xml,
whatever) from an ASP.NET page, then you should be able to use something
like the OutputCache to do it. Eg within page 1 do this:
<LINK href="MyStyleGenerator.aspx" type="text/css" rel="stylesheet">
and within MyStyleGenerator.aspx, use the OutputCache declaration.
Of course, within the ASPX that generates the CSS, you need to set the
content-type appropriately for the type of content you are dynamically
rendering.
Separate note:
ASP.NET can use the IIS6 kernel cache, if you use VaryByParam="none"
http://geekswithblogs.net/ewright/archive/2003/10/24/241.aspx
This has a nice perf advantage, because the IIS6 cache is served from kernel
space. This means no context switching to deliver cache results to the
requester. Speedy.
If the VaryByParam is not none, the cache still works as advertised, but it
is not served from the kernel listener (http.sys). Instead it is served
from ASP.NET, which means the cache doesn't perform as well. Still better
than not caching at all though.
-Dino
> Keywords: image cache caching css stylesheet expire expiration asp.net c#
> ==================================================
[quoted text clipped - 17 lines]
>
> Any ideas would be appreciated.