ASP.NET
  Home arrow ASP.NET arrow Page 3 - How Caching Means More Ca-ching, Part 1
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

How Caching Means More Ca-ching, Part 1
By: Justin Cook
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 28
    2004-04-21

    Table of Contents:
  • How Caching Means More Ca-ching, Part 1
  • Output Caching
  • Call The HttpCachePolicy!
  • Fragment Caching

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    How Caching Means More Ca-ching, Part 1 - Call The HttpCachePolicy!


    (Page 3 of 4 )

    If you want to use full page caching, but find the aforementioned methods insufficient for your needs, you may resort to using the far more granular HttpCachePolicy class. We do this in the fairly fool-proof manner of typing Response.Cache.[option]

    There is the simple option by which we set the expiration time:
    Response.Cache.SetExpires( DateTime.Now.AddSeconds( 600 ) )
    this is precisely the same as what we did already. We can also set the 'cacheability'  which determines who or what can cache this page. We set this option like this:


    Response.Cache.SetCacheabilityHttpCacheability.[option] )

    The options we can substitute here are:

    NoCache  The entire page or specified fields are not cached and must be re-requested.

    Server  The page is cached on the web server.

    Public  The page is cached on the client machine or shared (public) cache, such as a proxy server.

    Private  The page is cached on the client machine only. This is the default.

    So this is the simplest form of caching provided by ASP.Net. It is not suitable for all situations, but where you are able to use it, you will notice large performance gains. Now let's move on to the next form, fragment caching.

    More ASP.NET Articles
    More By Justin Cook


     

    ASP.NET ARTICLES

    - How Caching Means More Ca-ching, Part 2
    - How Caching Means More Ca-ching, Part 1
    - Reading a Delimited File Using ASP.Net and V...
    - What is .Net and Where is ASP.NET?
    - An Object Driven Interface with .Net
    - Create Your Own Guestbook In ASP.NET
    - HTTP File Download Without User Interaction ...
    - Dynamically Using Methods in ASP.NET
    - Changing the Page Size Interactively in a Da...
    - XML Serialization in ASP.NET
    - Using Objects in ASP.NET: Part 1/2
    - IE Web Controls in VB.NET
    - Class Frameworks in VB .NET
    - Cryptographic Objects in C#: Part 1
    - Sample Chapter: Pure ASP.Net







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT