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 8407091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:17:00+00:00 2026-06-09T23:17:00+00:00

In ASP.NET MVC, if I don’t put a [Duration=x, VaryByParam=None] attribute on my partial

  • 0

In ASP.NET MVC, if I don’t put a [Duration=x, VaryByParam="None"] attribute on my partial view, or if I put it with Duration=0, I sometimes get the error “Duration must be a positive number”. I have read many posts on this topic, and they all seem to say that including the attribute with a non-zero duration is the only way to avoid that error.

But I do NOT want the data cached at all (not even for 1 second), and it seems to me that setting a non-zero cache duration would almost by definition be enabling caching (for whatever length of time I specify for the Duration).

All the posts I’ve read seem to ignore that, and talk about setting an attribute with a Duration as the way to avoid caching, but that doesn’t make any sense to me. How can I completely avoid caching on a particular partial view? Also, is there a way to disable caching across my entire ASP.NET MVC application?

  • 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-06-09T23:17:01+00:00Added an answer on June 9, 2026 at 11:17 pm

    Thanks all for your input. The comments about the issue being client-side were helpful. In the end, it turned out the issue was due to ajax caching being enabled by default in Internet Explorer. The solution was to disable that caching with a JQuery call as follows:

    $.ajaxSetup({ cache: false });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Keywords: asp.net mvc 3, checkbox list, strongly typed view. So, please don't suggest me
The ASP.NET MVC Mini Profiler looks awesome, but I don't get the Linq 2
I don't know why Asp.net MVC developers put the using directives inside System.Web.Mvc namespace
Why don't we get compile errors on inline code errors in asp.net mvc views
I don't have grid view as I am working on asp.net MVC. So can
I am just getting started with ASP.NET MVC and it's great! However, I don't
Am new to programming and ASP.net MVC 3 so don't be surprised by my
I'm using the WebBrowser control in an ASP.NET MVC 2 app (don't judge, I'm
In ASP.NET MVC, we don't have controls which can do stuffs such as autocompletion
In ASP.NET MVC, there are these snippets of html called view templates which appear

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.