Home > DeveloperSection > Interviews > Explain the use of duration attribute of @OutputCache page directive

Posted on    May-23-2011 2:23 AM

 ASP.Net ASP.Net 
 1 Answer(s)
  1142  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Posted on    May-23-2011 12:00 AM

The @OutputCache directive’s Duration attribute determines how long the page is cached.
If the duration attribute is set to 60 seconds, the Web form is cached for 60 seconds; the server loads the response in memory and retains that response for 60 seconds.
Any requests during that time receive the cached response.
Once the cache duration has expired, the next request generates a new response and cached for another 60 seconds.

Don't want to miss updates? Please click the below button!

Follow MindStick