Implement "Donut Caching" with ASP.NET 2.0 Output Cache Substitution(weblogs.asp.net)

submitted by gavinjoycegavinjoyce(25.7k) 5 years, 2 months ago

"One of the most powerful, yet too often under-used, feature areas of ASP.NET is its rich caching infrastructure. ASP.NET's caching features enable you to avoid repeating work on the server for each new request received from clients. Instead, you can generate either html content or data structures once, and then cache/store the results within ASP.NET on the server and re-use them for later web requests. This can dramatically improve performance for your applications, and lower the load on critical backend resources like databases."

2 comments |category: |Views: 140

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by KateKate(0) 3 years, 11 months ago 0

Scott,
Thanks for the article. I have a question for the using of Substitution control(on Master page) though, Is there any way to access a session object that I previously stored in the session (i.e during the user log in process) inside the Substitution control's static method while still being able to do OutputCache on the content page? I tried to use HttpContext.Current.Session["ObjectName"] and Context.Session["ObjetName"]--Context is the HttpContext that passed to the static method. They both failed. Is there any way to work around it? Thanks.

Reply

posted by wesswess(65) 9 months, 16 days ago 0

any one using asp.et cache should also keep into mind its limitations as well specially if your app is running in a multi-server environment and data is distributed over these servers. in such cases, the use of a distributed cache can be a better option. read the following study for reference,

http://www.alachisoft.com/ncache/asp-net-cache.html

Reply

information Login or create an account to comment on this story