How do you 'cache' an ASP page?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john_aspinall@yahoo.co.uk

    How do you 'cache' an ASP page?

    Hi,

    Can someone tell me how you 'cache' an ASP page? I run a football
    predictions league site and some pages than calculate users points
    stats and the league table are taking ages to load. I think this is
    because its making loads of calculations (Although I could be wrong!).

    Ive been told the best way to solve this problem is to run the ASP page
    once and then 'cache' it. The page only needs to be run once to perform
    the calculations so I shouldnt be making it run the calculations on
    every request, as happens at the moment.



    Cheers...John

  • Mike Brind

    #2
    Re: How do you 'cache' an ASP page?


    <john_aspinall@ yahoo.co.ukwrot e in message
    news:1162679169 .525431.295630@ k70g2000cwa.goo glegroups.com.. .
    Hi,
    >
    Can someone tell me how you 'cache' an ASP page? I run a football
    predictions league site and some pages than calculate users points
    stats and the league table are taking ages to load. I think this is
    because its making loads of calculations (Although I could be wrong!).
    >
    Ive been told the best way to solve this problem is to run the ASP page
    once and then 'cache' it. The page only needs to be run once to perform
    the calculations so I shouldnt be making it run the calculations on
    every request, as happens at the moment.
    >

    >
    Cheers...John
    If the data doesn't change very often you can use the
    Scripting.FileS ystemObject to write the players list to an include file only
    when it changes, and call that into your page. Or you could cache the html
    string in the Application Object and again, only update it when the data
    changes and call that into your page.

    But you are right - that page takes a long time to load. What code are you
    using to generate the players list? (With as little html as possible,
    please).

    --
    Mike Brind



    Comment

    • Jon Paal

      #3
      Re: How do you 'cache' an ASP page?


      Covers the how's and why's of Web caching for people who publish on the Web. With FAQs.


      <john_aspinall@ yahoo.co.ukwrot e in message news:1162679169 .525431.295630@ k70g2000cwa.goo glegroups.com.. .
      Hi,
      >
      Can someone tell me how you 'cache' an ASP page? I run a football
      predictions league site and some pages than calculate users points
      stats and the league table are taking ages to load. I think this is
      because its making loads of calculations (Although I could be wrong!).
      >
      Ive been told the best way to solve this problem is to run the ASP page
      once and then 'cache' it. The page only needs to be run once to perform
      the calculations so I shouldnt be making it run the calculations on
      every request, as happens at the moment.
      >

      >
      Cheers...John
      >

      Comment

      Working...