This is a migrated thread and some comments may be shown as answers.

Rad Chart Caching

2 Answers 161 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Cary
Top achievements
Rank 2
Cary asked on 19 Feb 2009, 07:49 PM
Hi, I have an issue where the rad chart control is putting a large amount of chart renders into cache. Is there any way to turn this off?

To help setup the scenario we only use the charting control on one page, and that page is only viewable from a PC which displays the chart on a monitor. It's to help our sales guys and bosses to see turn around time for quotes. So it isn't an issue where a lot of people are hitting the chart because only one PC does. The page auto-refreshes the data once a minute using the Microsoft Ajax Timer control so no page post-back occurs. If I clear the cache, within a minute about 100 renders are cached again. The cache key is something like this "2888f173-6587-4610-aa66-c1b7ab206eb2_chart_ctl00$cphMainContent$chartTurnAround" cphMainContent is the content place holder ID, and chartTurnaround is the ID I gave to the chart.

Thanks,
Cary.

Code included below:
Telerik Rad Ajax chart version 2008.3.1105.35

                    <telerik:RadChart ID="chartTurnAround" runat="server" Skin="BlueStripes" Width="700px" 
                        SkinsOverrideStyles="true"
                    </telerik:RadChart> 

            chartTurnAround.DataSource = var 
            Dim ser As New Telerik.Charting.ChartSeries("Turn Around", Telerik.Charting.ChartSeriesType.Bar) 
 
            ser.DataLabelsColumn = "TurnAround" 
            ser.DataYColumn = "TurnAround" 
 
            chartTurnAround.Series.Add(ser) 
            chartTurnAround.SeriesOrientation = Telerik.Charting.ChartSeriesOrientation.Horizontal 
            chartTurnAround.PlotArea.XAxis.DataLabelsColumn = "FullName" 
 
            Dim max As Decimal = (From v In var Select v.TurnAround).Max() 
            max = IIf(max = 0, 10, max) 
            chartTurnAround.PlotArea.YAxis.AutoScale = False 
            chartTurnAround.PlotArea.YAxis.MinValue = 0 
            chartTurnAround.PlotArea.YAxis.MaxValue = max + (max Mod 10) 
            chartTurnAround.PlotArea.YAxis.Step = 10 
 
            chartTurnAround.ChartTitle.TextBlock.Text = "Average TurnAround Time (days)" 
            chartTurnAround.Legend.Visible = False 
            chartTurnAround.AutoLayout = True 
 
            chartTurnAround.PlotArea.EmptySeriesMessage.TextBlock.Text = "No Tasks have been completed in the last 7 days." 
            chartTurnAround.DataBind() 
 

2 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 23 Feb 2009, 02:19 PM
Hi Cary,

Indeed the RadChart HttpHandler uses the Http Cache in order to improve performance when serving the chart images on subsequent calls. The content is kept in the cache for 5 minutes and then is automatically cleared -- this functionality cannot be customized and caching cannot be disabled.

However, we are unable to reproduce the problematic behavior with the chart caching 100 renders in just a minute when it it updated on a timer with 1 minute interval. Could you send us a runnable sample application and a step by step guide how to track this behavior (you need to open a formal support ticket as attachments are not allowed in the public forums).


Regards,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Cary
Top achievements
Rank 2
answered on 25 Feb 2009, 10:20 PM
Actually, the difference is that the timer fires every second. I did this so the user had a count down clock to the next refresh. If I take that out then it works just fine. I'm guessing because the timer and the way it works there is no real fix to this which is fine.. It's not like the images are that big. I think in total after five minutes of running it was about 12 meg.
Tags
Chart (Obsolete)
Asked by
Cary
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
Cary
Top achievements
Rank 2
Share this question
or