Print Page | Close Window

Output cache

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=30049
Printed Date: 28 March 2026 at 6:56am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Output cache
Posted By: Gullanian
Subject: Output cache
Date Posted: 21 December 2011 at 10:19am
I have a web user control, it serves some potentially intensive data calculations and I would like it to be output cached so that each page view doesn't recalculate the data.  It resides on very frequently viewed pages so it's quite important I get it working right!

For context, it's used on our arcade:
http://www.scirra.com/arcade/action/93/8-bits-runner" rel="nofollow - http://www.scirra.com/arcade/action/93/8-bits-runner  

Click on stats, the data is generated from this webusercontrol.

The start of the control is as follows:

public partial class Controls_Arcade_Data_ArcadeChartData : System.Web.UI.UserControl
{
    public int GameID { get; set; }
    public Arcade.ChartDataType.ChartType Type { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {

Now the difficult I'm having is the output cache needs to be dependant on both the GamID and the ChartType.

This control is re-used with many different combinations of GameID's and Types, I need it to create a cache for each of these but am struggling to find out how to do this.

Any help appreciated!  I've spent a while looking online and it's kept coming up as something I need to solve but can't figure this one out.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net