Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3681568
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:42:10+00:00 2026-05-19T03:42:10+00:00

I set up a few pages with OutputCache profiles and confirmed that they are

  • 0

I set up a few pages with OutputCache profiles and confirmed that they are being cached by using multiple browsers and requests to retrieve the page with a timestamp which matched across all requests. When I try to enumerate the HttpContect.Cache it is always empty.

Any ideas what is going on here or where I should be going for this information instead?

Update:

It’s not client cache because multiple browsers are seeing the same response. Here is a bit of code to explain what’s happening.

Web.Config caching settings

<system.web>
    <caching>
        <outputCacheSettings>
            <outputCacheProfiles>
                <clear/>
                <add name="StaticContent" duration="1200" varyByParam="none"/>
                <add name="VaryByParam" duration="1200" varyByParam="*"/>
            </outputCacheProfiles>
        </outputCacheSettings>
    </caching>
     ...
</system.web>

**Action Method With Caching

[OutputCache(CacheProfile = "StaticContent")]
public ActionResult Index()
{
    return View(new CollaborateModel());
}

Code to enumerate the cache, yep it’s rough, an this is defined in a controller action method

    var sb = new StringBuilder();

    foreach (KeyValuePair<string, object> item in HttpContext.Cache)
    {
        sb.AppendFormat("{0} : {1}<br />", item.Key, item.Value.ToString());
    }

    ViewData.Add("CacheContents", sb.ToString());

The HttpContext.Cache is where the count is always null, even though the cache seems to be working fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:42:10+00:00Added an answer on May 19, 2026 at 3:42 am

    Instead of using the HttpCache I ended up rolling my own caching model for holding datasets in my Data Access layer. If I was looking up the AD profile of a given username and converting it to a DTO then I just put that profile in a rolling collection of profile DTOs that I would check before polling AD for the information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've changed a few pages from using generic JavaScript that sets a CSS style
I have a page that takes a few minutes to run. When I set
I would like to set a few textareas up so that when a user
Does this smell? I have a few properties you can only set once. They
I have some javascript code that is used in a few different pages in
I have a vbscript using the InternetExplorer object to navigate to a few pages
I'm using iText in Java to select a few pages out of a big
There are a few questions on here that are similar, but they didn't work
We've got a few pages using ajax to load in content and there's a
I have to set a few projects in our VS 2005 solution to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.