Sunny Sharma
Sunny Sharma

Reputation: 4934

Page Caching for certain URL Pattern on IIS 8.5

Is there any way to implement Page Caching for some certain URL pattern? For example, I have articles on my ASP.NET website and they don't changed so frequently. All of them have a URL pattern as following:

www.myite.com/articles/article1.aspx

www.myite.com/articles/article2.aspx

www.myite.com/articles/article3.aspx

and so on.

I want them all to be cached for 24 hours at least on server. How do I do it? Any help.

Upvotes: 0

Views: 1668

Answers (1)

Dhrumil
Dhrumil

Reputation: 3204

I would suggest you should have a look into Output Caching. This feature can help you achieve caching of pages and display content for less frequently changing pages.

Some good links on Output Caching :

MSDN : Output Caching

Output Caching Information

Also, for caching the pages that follow a specific URL pattern, you can either do that individually(which is quite obvious) and you can have a look into the <location> attribute available in the web.config which can help you configure various settings for specific directory that you specify in it. Of course, cache settings are also available inside the child tags for this tag.

This link might point in the right direction :

Set cache to a folder in web.config

Hope this helps.

Upvotes: 2

Related Questions