Confused with Output cache set programmatically

Discussion in 'ASP .Net' started by SharpSmith@gmail.com, Nov 10, 2006.

  1. Guest

    hi
    i have a strange problem with OutPut cache working fine on development
    box and not working on production server
    background : @outputCahce directive is fine, but wanted to make
    centralized output cache , so i have some setting section in web config
    defining what page and how to cache
    and in my Base Page i having following :
    <code>
    Response.Cache.VaryByParams["*"] = true; //will vary by all params
    DateTime expires = DateTime.Now.AddSeconds(duration );
    Response.Cache.SetExpires(expires ); // will valid for duration in
    seconds from now
    Response.Cache.SetValidUntilExpires(true); // will not update cache by
    client header ( ignore Ctrl+f5)
    Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate ); //
    whould be cached both by browser and at server
    </code>

    The problem is that on local machine it works fine: you load page, hit
    f5 or Ctrl+F5, and you see the server-cached version
    on server it other : you see that browser do caching , but F5 will
    bring you fresh, not-cached by server page

    used time-span printed with response.write on test pages
    and i sure that caching block is working, i write to log to ensure that
    some page added to cache

    done with ASP.Net 1.1 running IIS5 on dev and IIS6 on production
    Web has many resources on output caching but i not found any solution
    for this

    Any ideas guys ?

    Thanks Much
    EV
     
    , Nov 10, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Nokes

    Cache::Cache Stale Segments

    Jeff Nokes, Sep 30, 2003, in forum: Perl
    Replies:
    0
    Views:
    607
    Jeff Nokes
    Sep 30, 2003
  2. DesignerX

    Page.Cache vs HttpContext.Current.Cache

    DesignerX, Jan 20, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    8,325
    vMike
    Jan 20, 2004
  3. Kyle Brandon

    Programmatically flush iis cache

    Kyle Brandon, Sep 11, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,064
    Hermit Dave
    Sep 11, 2004
  4. Frank Rizzo

    How to set output cache to never expire?

    Frank Rizzo, Feb 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,390
    Joerg Jooss
    Feb 20, 2006
  5. =?Utf-8?B?b25l?=
    Replies:
    1
    Views:
    5,343
    Karl Seguin [MVP]
    Mar 8, 2006
Loading...

Share This Page