Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / May 2004

Tip: Looking for answers? Try searching our database.

Cache style sheets in the ASP.NET cache

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patty - 30 Apr 2004 22:11 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
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.