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

  • Home
  • SEARCH
  • 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 282247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:16:21+00:00 2026-05-12T05:16:21+00:00

I have just started using OutputCache on some of my controller actions and I

  • 0

I have just started using OutputCache on some of my controller actions and I am not quite getting the response I would expect.

I have set the cache time to 5 minutes and the Expires header is coming up the same as the Last-Modified header which is the time that the request was made.

This is the header I am currently getting:

Date                    Thu, 16 Jul 2009 06:35:07 GMT
Server                  Microsoft-IIS/6.0
X-Powered-By            ASP.NET
X-AspNet-Version        2.0.50727
X-AspNetMvc-Version     1.0
Content-Encoding        gzip
Cache-Control           public, max-age=300
Expires                 Thu, 16 Jul 2009 06:35:06 GMT
Last-Modified           Thu, 16 Jul 2009 06:35:03 GMT
Vary                    *
Content-Type            text/html; charset=utf-8
Content-Length          575

This is the header I would expect:

Date                    Thu, 16 Jul 2009 06:35:07 GMT
Server                  Microsoft-IIS/6.0
X-Powered-By            ASP.NET
X-AspNet-Version        2.0.50727
X-AspNetMvc-Version     1.0
Content-Encoding        gzip
Cache-Control           public, max-age=300
Expires                 Thu, 16 Jul 2009 06:40:06 GMT
Last-Modified           Thu, 16 Jul 2009 06:35:03 GMT
Vary                    *
Content-Type            text/html; charset=utf-8
Content-Length          575

Any ideas on why it would be doing this?

Cheers
Anthony

  • 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-12T05:16:21+00:00Added an answer on May 12, 2026 at 5:16 am

    max-age takes precedence (from RFC 2616):

    We use the term expires_value to
    denote the value of the Expires
    header. We use the term
    max_age_value to denote an
    appropriate value of the number of
    seconds carried by the “max-age”
    directive of the Cache-Control header
    in a response (see section 14.9.3).

    The max-age directive takes priority
    over Expires, so if max-age is present
    in a response, the calculation is
    simply:

      freshness_lifetime = max_age_value 
    

    Otherwise, if Expires is
    present in the response, the
    calculation is:

      freshness_lifetime = expires_value - date_value
    

    So the client should use the cached version as you expect.

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

Sidebar

Related Questions

I have just started using OutputCache on some of my controller actions and I
I have just started using Boost 1.36. These libraries would be very useful in
Just getting started using MVC in ASP.NET, I'm going to have it so users
I have just started using jqGrid , and I have some tables that I
I have just started using TFS and have some questions about hotkeys. It is
I just started using Coderush and found some stuff that I used to have
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have just started using silverlight 2 beta and cannot find how to or
I just started using SVN, and I have a cache directory that I don't

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.