Hello
Due to performance issues of my application, I need to know how to cache style sheets in the ASP.NET cache and reuse the cached versions for later transformations
Any input is welcomed
PP
Alvin Bruney [MVP] - 01 May 2004 16:43 GMT
what performance problems are you having? How do you know caching a style
sheet will improve performance? Have you figured out where the bottle neck
is? In short, I do not believe caching a style sheet will help you.

Signature
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
> Hello,
> Due to performance issues of my application, I need to know how to cache
[quoted text clipped - 4 lines]
>
> PP
Thomas Johansen - 01 May 2004 19:26 GMT
> Hello,
> Due to performance issues of my application, I need to know how to cache style sheets in the ASP.NET cache and reuse the cached versions for later transformations.
>
> Any input is welcomed.
>
> PP
I have no clue as to what you are doing with this style sheet, but if
you are not doing anything with it using ASP.NET is it utterly pointless
to cache it. Stylesheets are dealt with client-side, and most browsers
cache them automatically (client-side).
--
Regards,
Thomas Johansen
Jamey McElveen - 03 May 2004 14:15 GMT
I assume that you are refering to an XSLT stylesheet since you are
transforming it? You can try caching the XmlDocument in your pages
Cache[] or Application[] object (example below). I am not sure if this is
thread safe? If it is not try storing the text(InnerXML) instead of the
object.
XmlDocument xslt = new XmlDocument();
xslt.InnerXml =
@"<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<!-- root template -->
<xsl:template match='/'>
<xsl:apply-templates/>
</xsl:template>
<!-- root template -->
<xsl:template match='contact'>
<xsl:value-of select='@firstname'/><xsl:text> </xsl:text><xsl:value-of
select='@lastname'/>
</xsl:template>
</xsl:stylesheet>";
Cache["xslt"] = xslt;
> Hello,
> Due to performance issues of my application, I need to know how to cache style sheets in the ASP.NET cache and reuse the cached versions for later
transformations.
> Any input is welcomed.
>
> PP