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. Advertisements

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:
    783
    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,548
    vMike
    Jan 20, 2004
  3. Kyle Brandon

    Programmatically flush iis cache

    Kyle Brandon, Sep 11, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,314
    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,732
    Joerg Jooss
    Feb 20, 2006
  5. =?Utf-8?B?b25l?=
    Replies:
    1
    Views:
    5,528
    Karl Seguin [MVP]
    Mar 8, 2006
  6. Sergey via DotNetMonster.com

    ASP.NET Cache vs Window System Cache

    Sergey via DotNetMonster.com, Nov 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    655
    Sergey via DotNetMonster.com
    Nov 15, 2006
  7. John
    Replies:
    2
    Views:
    1,419
  8. David Lozzi

    To cache or not to cache

    David Lozzi, Aug 21, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    450
    vMike
    Aug 21, 2007
Loading...