Amit Wadhwa
Amit Wadhwa

Reputation: 735

Cache dynamic page on server side

I have a dynamic internal status page for the team written in ASP.NET/Razor and hosted on IIS. The page queries multiple services and sql databases to generate the dynamic content.

I was wondering what would be the various ways to cache the page content on the above setup so the page doesn't have to query the various services it uses whenever a user loads the page and instead it fetches the content every few minutes. (all users see the same content/page)

Edit: The website is written using C#

Upvotes: 0

Views: 1088

Answers (1)

Clay Sills
Clay Sills

Reputation: 235

If you're using at least .Net 4.0, you want to use caching.

Since you don't list the language you're using, the best I know of is to point you here:

https://msdn.microsoft.com/en-us/library/vstudio/Ff477235(v=VS.100).aspx

If you're using c# (or are good at translating c# into another .Net language) this example is really good:

http://www.asp.net/mvc/overview/older-versions-1/controllers-and-routing/improving-performance-with-output-caching-cs

Upvotes: 1

Related Questions